0

I have XML code as given below and XSLT 1.0 code is not handling the correctly.

<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>

and my XSLT 1.0 code is

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

What should be the XSLT code to get the new lines for every instance of &#xA;

Tomalak
  • 332,285
  • 67
  • 532
  • 628
naidu np
  • 9
  • 4

1 Answers1

1

I suspect your problem is that a newline character in HTML does not cause text to be displayed on a new line; it is treated as equivalent to space. If you want text to appear on a new line in the browser, you need to use a <br> element (or, for example, a <pre> element).

See for example how to convert NEWLINE into <BR/> with XSLT?

The problem has absolutely nothing to do with disable-output-escaping.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164