关于设置默认命名空间后xslt转换显示的问题
xml实例文件test.xml内容为
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="env.xslt"?><document xmlns="http://www.fyswords.com.cn/xml"> <title>title</title> <department>dept</department> <region>region</region> <pass_date>2011-09-05</pass_date> <enforce_date>2011-09-05</enforce_date> <body> <chapter index="1"> <text>chapter text</text> <clause index="1"> <text>clause text</text> </clause> </chapter> </body></document>
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns="http://www.fyswords.com.cn/xml" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output encoding="UTF-16" indent="yes"/><xsl:template match="/"> <html:html> <html:head> <html:title> <xsl:value-of select="/document/title"/> </html:title> </html:head> <html:body> <html:h2><xsl:value-of select="/document/title" /></html:h2> <html:p>发布部门:<xsl:value-of select="/document/department" /></html:p> <html:p>发布日期:<xsl:value-of select="/document/pass_date" /></html:p> <html:p>执行日期:<xsl:value-of select="/document/enforce_date" /></html:p> <xsl:apply-templates select="/document/body/chapter"/> </html:body> </html:html></xsl:template><xsl:template match="chapter"> <html:h3><xsl:value-of select="text"/></html:h3> <xsl:apply-templates select="clause"/></xsl:template><xsl:template match="clause"> <html:p><xsl:value-of select="text"/></html:p></xsl:template></xsl:stylesheet>
xmlns="http://www.fyswords.com.cn/xml"