views:

82

answers:

2

Hi,

I have numerous XML files that are organized into different directories. I need to combine them and transform the result using XSLT. So far, I have already done this except for one problem: some XML files need to be transformed first before it can be included into the result. xinclude seems to ignore the xml-stylesheet declaration.

How can i transform XML files before they are xincluded?

Regards,

[ simon.cpu ]

+1  A: 

How is the process run? With a Makefile or something like that? In that case, add explicit calls to xsltproc before the inclusion and then xinclude the output of xsltproc.

If xsltproc can read the processing instruction (xml-stylesheet, note that I did not test that), you do not even have to indicate explicitely the stylesheet to use.

bortzmeyer
I think I'll either write a Bourne shell or PHP script. Someone at IRC gave the same suggestion too: do a two-pass operation and xinclude the result.I wish xinclude supported XSLT... =)
simoncpu
+1  A: 

Break it up into multiple transform calls, first prepare the xml files, then do your main transformation.

igor