Re: [xsl] Merging multiple documents and combining their nodes

Subject: Re: [xsl] Merging multiple documents and combining their nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 14 Jun 2007 16:57:31 +0100
> Does anyone see what is missing?
Nothing misssing, just bad stuff added.



$ saxon file.xml file.xsl
Error at xsl:copy-of on line 16 of file:/c:/tmp/file.xsl:
  Cannot write an attribute when there is no open start tag
Transformation failed: Run-time errors were reported


which is due to the literal "(" you inserted before copying the attributes

(<xsl:copy-of select="@*|
^
^
^


After removing that I get

$ saxon file.xml file.xsl
<?xml version="1.0" encoding="utf-8"?>
<components xmlns:exslt="http://exslt.org/common";>
(<component name="a" description="1">
      <childA>Value1</childA>
      <childB>Value1</childB>
      <childA>Value3</childA>
      <childB>Value3</childB>
   </component>
(<component name="b" description="1">
      <childA>Value2</childA>
      <childB>Value2</childB>
   </component>
</components>


which is what you wanted I thinkl where file1 2 and 3 are:

$ cat file{1,2,3}.xml
<components>
    <component name="a" description="1">
         <childA>Value1</childA>
         <childB>Value1</childB>
    </component>
</components>
<components>
    <component name="b" description="1">
         <childA>Value2</childA>
         <childB>Value2</childB>
    </component>
</components>
<components>
    <component name="a" description="1">
         <childA>Value3</childA>
         <childB>Value3</childB>
    </component>
</components>

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread