【问题标题】:disable-output-escaping="yes" in XSLT 1.0 is not working for 
XSLT 1.0 中的 disable-output-escaping="yes" 不适用于
【发布时间】:2023-03-17 16:10:01
【问题描述】:

我有如下给出的 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"/>

为每个&amp;#xA; 实例获取新行的 XSLT 代码应该是什么

【问题讨论】:

    标签: xslt newline


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 2012-07-19
      • 2015-06-08
      • 2010-11-11
      • 1970-01-01
      • 1970-01-01
      • 2012-06-21
      • 2014-09-06
      • 1970-01-01
      • 2014-08-30
      相关资源
      最近更新 更多