PtiTom

Pass Thru XSL

Mar 6th, 2014
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.73 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4. <!--Identity template,
  5.        provides default behavior that copies all content into the output -->
  6.     <xsl:template match="@*|node()">
  7.         <xsl:copy>
  8.             <xsl:apply-templates select="@*|node()"/>
  9.         </xsl:copy>
  10.     </xsl:template>
  11.  
  12.     <!--More specific template for Node766 that provides custom behavior -->
  13.     <xsl:template match="Node766">  
  14.         <xsl:copy>
  15.             <xsl:apply-templates select="@*|node()"/>
  16.             <!--Do something special for Node766, like add a certain string-->
  17.             <xsl:text> add some text </xsl:text>
  18.         </xsl:copy>
  19.     </xsl:template>
  20.  
  21. </xsl:stylesheet>
Add Comment
Please, Sign In to add comment