Nic Miloslav Example 10 | KEYWORDS EXAMPLES AUTHORS |
---|
Copy and copy-of constructs are used for nodes copying. Copy element copies only the current node without children and attributes, while copy-of copies everything.
XML | HOME XSL 1 |
---|
<xslTutorial > |
<p id="a12"> |
Compare <B>these constructs</B>. |
</p> |
</xslTutorial> |
XSL 1 | HOME XML HTML 1 OUTPUT 1 |
---|
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' > |
<xsl:template match="p"> |
<DIV><B><xsl:text> copy-of : </xsl:text> </B> |
<xsl:copy-of select="."/> |
</DIV> |
<DIV><B><xsl:text> copy : </xsl:text> </B> |
<xsl:copy/ > |
</DIV> |
<DIV><B><xsl:text> value-of : </xsl:text> </B> |
<xsl:value-of select="."/> |
</DIV> |
</xsl:template> |
</xsl:stylesheet> |
HTML 1 | HOME XML XSL 1 OUTPUT 1 |
---|
<HTML> |
<HEAD> </HEAD> |
<BODY> |
<DIV> |
<B>copy-of : </B> |
<p id="a12"> Compare |
<B>these constructs</B>. </p></DIV> |
<DIV> |
<B>copy : </B> |
<p/></DIV> |
<DIV> |
<B>value-of : </B> Compare these constructs. </DIV> </BODY> </HTML> |
OUTPUT 1 | HOME XML XSL 1 HTML 1 |
---|
Compare these constructs.