2

I am using XSLt (version - <?xml version="1.0", stylesheet version="2.0">). I have a node in XML that is having text with line break. When XSLT is parsed I got the output in a single line and not in paragraphs as expected.

My XML

<NotificationNotesFromHaulier>
 This is VR1 application.
 STGO Cat2 configuration.
 Test ?
</NotificationNotesFromHaulier>

My XSLT

<xsl:choose>
            <xsl:when test="ns1:NotificationNotesFromHaulier !=''">

              <xsl:if test="contains(ns1:NotificationNotesFromHaulier, '##**##')">
                <xsl:value-of select="substring-after(ns1:NotificationNotesFromHaulier, '##**##')"/>
              </xsl:if>

              <xsl:if test="contains(ns1:NotificationNotesFromHaulier, '##**##')=false()">
                <xsl:value-of select="ns1:NotificationNotesFromHaulier" />
              </xsl:if>

            </xsl:when>
            <xsl:otherwise>
              There are no notes
            </xsl:otherwise>
 </xsl:choose>

The output shown is as below

This is VR1 application. STGO Cat2 configuration. Test ?

Expected output(I want as below from XSLT)

 This is VR1 application.
 STGO Cat2 configuration.
 Test ?
kjhughes
  • 106,133
  • 27
  • 181
  • 240
Tejas Thakor
  • 97
  • 12
  • Can you share your optimal xslt implementation (e.g. initial 6-7 lines or header or the matching template) ? That will help to recognize the issue. Thanks. – Vebbie Apr 10 '19 at 11:14
  • Hi I have updated the description part check it @Vebbie – Tejas Thakor Apr 10 '19 at 12:08
  • Your expected output is indeed your actual output: [Proof](https://xsltfiddle.liberty-development.net/jyRYYit) – kjhughes Apr 18 '19 at 17:32

0 Answers0