XSLT xsl:with-param 용법

<결과>


도서명 가격
괴테의 이탈리아 기행 15000
브리짓존스의 일기 7800
씨 뿌리는 사람의 씨앗 6000
하루키의 여행법 7000
인도방랑 8800


 



----------------------------------------------------------------------------------------



<?xml:namespace prefix = xsl /><xsl:stylesheet version="1.0" xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"></xsl:output>
<xsl:template match="/">



<table border="1">
<tbody><tr>
<td>
<b>도서명</b>
</td>
<td>
<b>가격</b>
</td>
</tr>
<xsl:for-each select="//도서">
<tr>
<td>
<xsl:value-of select="도서명"></xsl:value-of>
</td>
<td>
<xsl:call-template name="value">
<xsl:with-param select="가격" name="varPrice"></xsl:with-param>
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
</tbody></table>



</xsl:template>
<xsl:template name="value">
<xsl:param name="varPrice"></xsl:param>
<xsl:value-of select="$varPrice"></xsl:value-of>
</xsl:template>
</xsl:stylesheet>