View Single Post
  #6 (permalink)  
Old August 4th, 2009, 09:19 AM
Martin Honnen Martin Honnen is offline
Friend of Wrox
Points: 6,676, Level: 34
Points: 6,676, Level: 34 Points: 6,676, Level: 34 Points: 6,676, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Code:
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0">

  <xsl:template match="@* | node()">
    <xsl:copy>
       <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="test">
     <xsl:copy>
       <xsl:apply-templates select="@* | node()"/>
       <xsl:apply-templates select="document('medium.xml')/ip-tests/test/section"/>
       <xsl:apply-templates select="document('complex.xml')/ip-tests/test/section"/>
     </xsl:copy>
  </xsl:template>

</xsl:stylesheet>
That copies the section elements in medium and complex.xml at the end of the test element in simple.xml.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog

Last edited by Martin Honnen; August 4th, 2009 at 09:24 AM.. Reason: correcting typo
Reply With Quote