Xalan XSLT multiple output files?

旧街凉风 提交于 2019-12-08 02:29:22

问题


I'd just like to know, is it possible to output the processing of a single input XML file to multiple other files using Xalan?

I don't necessarily HAVE to do it that way, I know I can use other tools to do it (like Saxon), and/or I could process different files to obtain different outputs. I'd just like to know the options I have to do exactly what I'm asking for with the very tools I'm planning on using. Any reason why I shouldn't use that tool to do this task is also welcome.

The context is kinda simple, I'm trying to transform an XML file that represents the structure of a multipage, multilanguage website. The (current and potentially future) structure of the file is something like

    <pages>
      <page>
        <language name="xyz">
          <!-- More interesting stuff -->
        </language>
      </page>
    </pages>

Potentially, a page will contain multiple languages, but it doesn't have to be so.


回答1:


Are you using Xalan-J or Xalan-C? If you are using Xalan-J, the Redirect extension should do the trick.



来源:https://stackoverflow.com/questions/1358941/xalan-xslt-multiple-output-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!