Xalan XSLT multiple output files?

2019-05-29 00:43发布

问题:

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.



标签: xml xslt xalan