Saxon to save multiple node XML

Post Reply
abonsey
Member
Posts: 98
Joined: Fri May 24, 2013 5:10 pm

Saxon to save multiple node XML

Post 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.
jan_suhr
Member
Posts: 57
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Saxon to save multiple node XML

Post by jan_suhr »

Try this

Code: Select all

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

Jan
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Post Reply