0

I am trying to write a style sheet to generate code taking an XML file as input. I tried a lot to insert a newline inside an <xsl:text> element by using &#x0a; or &#x0a;&#x13 and also with

 <xsl:variable name='newline'><xsl:text>
 </xsl:text></xsl:variable>

but in output all of these things are adding a space character just like &#160;

The part of my code where I want to insert a newline is:

<xsl:variable name="StructType" select="diStructType"/>

 <line>
    <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
    <xsl:value-of select="replace($StructType, ';', ';&#xa;&#13;&#160;&#160;&#160;&#160;')"/>
    <xsl:text>;</xsl:text>
  </line>

Here $StructType is a string containing ; in between. I am just trying to replace that ; with ;+newline+(4*space).

Please help

Thanks in advance.

Borodin
  • 126,100
  • 9
  • 70
  • 144
tod
  • 81
  • 1
  • 6

0 Answers0