tags:

views:

377

answers:

1

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.

A: 

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

Jukka Matilainen
Yeah, well, it seems like it is the proper solution for what I'm seeking to do, but I still encounter problems with it, redirect:write spits out errors and dies miserably. I'll have to look at other alternatives, I guess.
MrZombie
My bad, somehow, Xalan didn't like how I did some of the stuff, but I can't say I know how I actually fixed the thing. Which is a little unsettling.
MrZombie