XSLT 1.0 中的 disable-output-escaping="yes" 不适用于

disable-output-escaping="yes" in XSLT 1.0 is not working for 


我有 XML 代码如下,XSLT 1.0 代码没有处理 正确。

<customnote>
    <sketchpads title="PT Follow up" doctypeid="1025" doctypename="PHYSICAL THERAPY NOTES">
        <sketchpad seq="0" canvasheight="500px" expandcount="0">
            <text data="40/54&#xA;&#xA;S: States neck is stiff and tight today.&#xA;&#xA;O: Manual therapy 30 min.&#xA;STM to B CS paraspinals PA to C4-C7 gr.I-II.&#xA;B UT and levator stretches 2x30&quot; each.&#xA;&#xA;A:  increased tightness to B CS paraspinals L&gt;R.&#xA;&#xA;P: Decrease pain and in AROM.&#xA;&#xA;PT: Yolanta Boese&#xA; "/>
        </sketchpad>
    </sketchpads>
</customnote>

我的 XSLT 1.0 代码是

<xsl:value-of select="customnote/sketchpads/sketchpad/text/@data" disable-output-escaping="yes"/>

&#xA;

的每个实例获取新行的 XSLT 代码应该是什么

我怀疑您的问题是 HTML 中的换行符不会导致文本显示在新行上;它被视为等同于 space。如果您希望文本在浏览器中换行显示,则需要使用 <br> 元素(或者,例如 <pre> 元素)。

参见示例how to convert NEWLINE into <BR/> with XSLT?

此问题与禁用输出转义完全无关。