Input files are
File 1:
<?xml version="1.0" encoding="iso-8859-1" ?><confirmationDocument xmlns="http://schema.umbrella.ch/UmbrellaB2B/uB2B_Confirmation" xmlns:xsi="http://www.w3.org/2001/XMLSchema" origin="Galileo" type="Unticketed" id="1" creationDate="2006-02-16" modifyDate="2006-02-16" modifyTime="08:23:00">
<participants>
<participant participantNr="1">
<name>Mueller</name>
<firstname>Markus</firstname>
</participant>
</participants>
<services>
<service xmlns="" xsi:type="SrvcFlight" id="0">
<flightno>1233</flightno>
<flightCode>A34</flightCode>
</service>
</services>
</confirmationDocument>
File 2:
<?xml version="1.0" encoding="iso-8859-1" ?><confirmationDocument xmlns="http://schema.umbrella.ch/UmbrellaB2B/uB2B_Confirmation" xmlns:xsi="http://www.w3.org/2001/XMLSchema" origin="Galileo" type="Unticketed" id="1" creationDate="2006-02-16" modifyDate="2006-02-16" modifyTime="08:23:00">
<participants>
<participant participantNr="1">
<name>Mueller</name>
<firstname>Markus</firstname>
</participant>
</participants>
<services>
<service xmlns="" xsi:type="SrvcCar" id="1">
<carno>1233</carno>
<carProvider>AVIS</carProvider>
</service>
</services>
</confirmationDocument>
Expected Output:
<?xml version="1.0" encoding="iso-8859-1" ?><confirmationDocument xmlns="http://schema.umbrella.ch/UmbrellaB2B/uB2B_Confirmation" xmlns:xsi="http://www.w3.org/2001/XMLSchema" origin="Galileo" type="Unticketed" id="1" creationDate="2006-02-16" modifyDate="2006-02-16" modifyTime="08:23:00">
<participants>
<participant participantNr="1">
<name>Mueller</name>
<firstname>Markus</firstname>
</participant>
</participants>
<services>
<service xmlns="" xsi:type="SrvcFlight" id="0">
<flightno>1233</flightno>
<flightCode>A34</flightCode>
</service>
<service xmlns="" xsi:type="SrvcCar" id="1">
<carno>1233</carno>
<carProvider>AVIS</carProvider>
</service>
</services>
</confirmationDocument>
There may be any no of service in both the files.
Quote:
quote:Originally posted by mhkay
You need to show what your input files were, what result you obtained, and what result you wanted.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|