cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT-transformation inserts linefeeds

Former Member
0 Kudos

Hi,

I am using XSLT-transformation on WAS 7.0. Part of the result of my XSLT-transformations is javascript-sourcecode.

The statement

<xsl:output omit-xml-declaration="yes" indent="no" method="html" encoding="utf-8" />

should generate browser-readable html-code.

So take the line

xxxxx<br/>yyyyy

After the transformation I am expecting the result

xxxxx<br>yyyyy

wheras the XSLT-transformation engine returns

xxxxx<br>
<br>
yyyyy<br>

(LINEBREAKS ARE INSERTED FOR EACH LINE!!!)

As my result is javascript-source, this behaviour is a huge problem, as - due to the linefeeds - my generated javascipt-code is not executable anymore.

Does anybody know a solution, how I can tell the XSLT-processor to generate code WITHOUT linefeeds?

Thanks,

Andreas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use <xsl:text> element.

http://msdn2.microsoft.com/en-us/library/ms256107.aspx

Good luck!

Roelof

Former Member
0 Kudos

A <i>value-of tag</i> would be much useful .

<xsl:value-of

select? = expression

separator? =

[disable-output-escaping]? = "yes" | "no">

</xsl:value-of>

e.g

<xsl:template match="description">

<xsl:value-of select="." disable-output-escaping="yes" />

</xsl:template>