以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  我是初学者,想问一问怎么样将xslt的变量打出到html.  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=8101)


--  作者:Water
--  发布时间:6/4/2004 10:23:00 AM

--  我是初学者,想问一问怎么样将xslt的变量打出到html.
代码如下,怎么样可以将变量description打出到<P></p>
里面啊?我在前面加了$可是还是不能打,请各位大老指教!

<xsl:template match="channel/item">
<p>
<xsl:variable name="channel_link" select="link"></xsl:variable>
<xsl:variable name="description" select="description"></xsl:variable>
<!--<p>$channel_link</p>-->
<a href="{$channel_link}" >
<xsl:value-of select="title"/></a><hr/>
<!--怎么样打印出description来啊?-->
<p><xsl:text>{$description}</xsl:text></p>
</p>
</xsl:template>


--  作者:sam
--  发布时间:6/4/2004 2:00:00 PM

--  
<xsl:value-of select="$description"/>
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
8,437.500ms