Page 1 of 1

Saxon to save multiple node XML

Posted: Tue Mar 15, 2016 6:23 pm
by abonsey
I'm using Saxon to save multiple node XML to single XML.
This works fine when the XML is supplied in the following format:
.....
<Items>
<Item>
<LineNumber>PM5853</LineNumber>
.....

In the XSLT the instruction for the file name looks like this and this file creates fine:
<xsl:result-document method="xml" href="{LineNumber}.xml">





The problem I have is that some XML is being supplied as:
.....
<Items>
<Item LineNumber="PM5853" Rush="No" type="New" approved="NA" WaitingScheduler="No">
.....

This causes the XSLT to fail.




My question is how to I correctly call for {LineNumber} for this type of XML


Thanks for any help.

Re: Saxon to save multiple node XML

Posted: Thu Mar 17, 2016 10:58 am
by jan_suhr
Try this

Code: Select all

 <xsl:result-document method="xml" href="{item/@LineNumber}.xml">

Jan