home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 160 - Disc 2 / MF_UK_160_2.iso / pc / DiscContent / Trials / oxygen / samples / debugger / Copying / sample1.xsl < prev   
Encoding:
Extensible Markup Language  |  2005-07-21  |  922 b   |  28 lines

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--    Category:    Copying
  3.     Sample from Zvon XSLT tutorial (www.zvon.org)  
  4.     Description:    Copy and copy-of constructs are used for nodes copying. Copy element copies 
  5.         only the current node without children and attributes, while copy-of copies everything.  -->
  6. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  7.     <xsl:template match="p">
  8.         <DIV>
  9.             <B>
  10.                 <xsl:text>copy-of : </xsl:text>
  11.             </B>
  12.             <xsl:copy-of select="."/>
  13.         </DIV>
  14.         <DIV>
  15.             <B>
  16.                 <xsl:text>copy : </xsl:text>
  17.             </B>
  18.             <xsl:copy/>
  19.         </DIV>
  20.         <DIV>
  21.             <B>
  22.                 <xsl:text>value-of : </xsl:text>
  23.             </B>
  24.             <xsl:value-of select="."/>
  25.         </DIV>
  26.     </xsl:template>
  27. </xsl:stylesheet>
  28.