<xsl:variable>‚ŕϔ‚ɉ~Žü—¦‚ð“ü‚ê‚Ä–ÊÏ‚ðŒvŽZ‚·‚é—á
ysample040.xmlz
<?xml version="1.0" encoding="Shift_JIS" ?>
<?xml-stylesheet href="sample040.xsl" type="text/xsl" ?>
<‰~>
<”¼Œa>10</”¼Œa>
<”¼Œa>5</”¼Œa>
<”¼Œa>128</”¼Œa>
<”¼Œa>0.1</”¼Œa>
<”¼Œa>3333</”¼Œa>
</‰~>
ysample040.xslz
<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" encoding="Shift_JIS"/>
<xsl:template match="‰~">
<html>
<xsl:apply-templates select="”¼Œa" />
</html>
</xsl:template>
<xsl:template match="”¼Œa">
<xsl:variable name="pi">3.14</xsl:variable>
<p>
”¼Œa
<span style="color:blue;">
<xsl:value-of select="." />
</span>
‚‚̉~‚Ì–ÊÏ‚Í
<span style="color:red;">
<xsl:value-of select=".*.*$pi" />
</span>
‡u‚Å‚·B
</p>
</xsl:template>
</xsl:stylesheet>
yŒ‹‰Êz