以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  入门问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=17126)


--  作者:sinostone
--  发布时间:4/18/2005 1:53:00 PM

--  入门问题
xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>

<document>
 <title-page>XSLT Processors Comparison</title-page>
 <chapter>Introduction</chapter>
 <chapter>Outline of Methodology</chapter>
 <chapter>Speed</chapter>
 <chapter>Space</chapter>
 <chapter>Conformance</chapter>
 <chapter>Conclusion</chapter>
</document>

xsl:
<?xml version='1.0' encoding='iso-8859-1'?>

<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSLT/Transform'>

<xsl:template match='document'>
 <HTML>
 <HEAD>
  <TITLE><xsl:value-of select='title-page'/></TITLE>
 </HEAD>
 
 <BODY>
  
 </BODY>
 </HTML>
</xsl:template>
</xsl:stylesheet>

<xsl:value-of select='title-page'/>为什么不能显示?


--  作者:guan1200
--  发布时间:4/18/2005 5:36:00 PM

--  
你没有匹配根模板:
<xsl:template match="/">
</xsl:template>

W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
41.992ms