|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Split files with XSLT2.0 xsl:result-document
Hello,
I am sure that <xsl:result-document> is perfect for my purpose. But I
still struggle with the following task. I have a (deep) folder structure
${in_dir} with xml files. Each file might hold multiple elements of type
contentitem
e.g. the fictious file bar.xml.
<root>
<contentitem>
...
</contentitem>
<contentitem>
...
</contentitem>
<contentitem>
<anchor name="xyz"/> <--- NOT ALL CONTENTITEM HAVE A <anchor>
...
</contentitem>
</root>
I need to split this in a way that I get one file per <contentitem>. But
I need to preserve the folder structure plus modify the resulting
filename based on node values.
E.g. the input file:
\in_dir
\foo
\bar.xml
Needs to be splitted to
\out_dir
\foo
\bar1.xml <-- number unnamed fragments
\bar2.xml <-- number unnamed fragments
\bar#xyz.xml <-- use /anchor/@name for name extension
Can anybody help me to solve this? Thanks in advance!
Robert
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








