带html
序列化方法>,script
内容没有消失。
http://www.w3.org/TR/xslt#section-spanish-Output-Method”rel=“nofollow”http://www.w3.org/TR/xslt#section-spanish-Output-Method
The html
output method should not
perform escaping for the content of
the script
and style
elements
Update
As Dr. @ Michael Kay已评论说,如果你为浏览器制造X超文本(并配送正确的监听器类型),那么你就不必担心无动于衷。 此外,应当指出,在线文字不被认为是良好做法。
如果你仍然希望按照关于遗产浏览器的准则,以<代码>xml序列化方法,你可以宣布<代码>> > > > 封面代码>内容为光盘传输系统。
http://www.w3.org/TR/xslt#section-XML-Output-Method” rel=“nofollow” http://www.w3.org/TR/xslt#section-XML-Output-Method
The cdata-section-elements
attribute
contains a whitespace-separated list
of QNames. Each QName is expanded into
an expanded-name using the namespace
declarations in effect on the
xsl:output
element in which the
QName occurs; if there is a default
namespace, it is used for QNames that
do not have a prefix. The expansion is
performed before the merging of
multiple xsl:output
elements into a
single effective xsl:output
element.
If the expanded-name of the parent of
a text node is a member of the list,
then the text node should be output as
a CDATA section
例如:
<xsl:output cdata-section-elements="xhtml:script xhtml:style"
xmlns:xhtml="http://www.w3.org/1999/xhtml"/>