
298 • XML & Related Technologies
Solution
<xsl:stylesheet version=”1.0”
xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>
<xsl:template match=”order”>
<xsl:choose>
<xsl:when test=”total < 10”>
(small)
</xsl:when>
<xsl:when test=”total < 20”>
(medium)
</xsl:when>
<xsl:otherwise>
(large)
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
<BR/>
</xsl:template>
</xsl:stylesheet>
6.4.5 Copying Nodes Using
<xsl:copy>
and
<xsl:copy-of>
We can copy elements from the source XML document into the resulting output document, by
using the <xsl:copy> or the <xsl:copy-of> syntaxes.
This feature allows us to process XML contents without using ...