Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html xslt文本禁用输出转义_Html_Xml_Xslt_Cdata - Fatal编程技术网

Html xslt文本禁用输出转义

Html xslt文本禁用输出转义,html,xml,xslt,cdata,Html,Xml,Xslt,Cdata,使用XSL从XML创建HTML页面我想知道如何编写注释 在生成的HTML页面中 这是到目前为止我的XSL: <?xml version="1.0" encoding="US-ASCII" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" omit-xml-declaration="no" in

使用XSL从XML创建HTML页面我想知道如何编写注释 在生成的HTML页面中

这是到目前为止我的XSL:

<?xml version="1.0" encoding="US-ASCII" ?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html" omit-xml-declaration="no" indent="yes" />
      <xsl:text disable-output-escaping="yes">
        <![CDATA[<!--comment-->]]>
      </xsl:text>
</xsl:stylesheet>
我怎样才能做到这一点

这样做:

...
<xsl:comment>comment</xsl:comment>
...
。。。
评论
...
您不会将其包装到
xsl:text
CDATA
xsl:comment
将在结果树中创建注释节点。以下是该规范的链接:

...
<xsl:comment>comment</xsl:comment>
...