Skip to Content
Nov 17, 2005 at 11:04 AM

XSLT problem with Carriage return in Web Dynpro


My problem is:

In java application, I can tranform the xml file into another format with a certain stylesheet(XSL file) properly. But when I use the same code and the same XSL file to do the transformation in Web Dynpro, it outputs the wrong result, in which all the <b>Carriage Return disappears</b>.

Here is the example:

-Input file (source.xml) -

<?xml version="1.0"?>

<?xml-stylesheet type='text/xsl'>


<Name age="20">Sandy</Name>

<Name age="23">Sue</Name>

<Name age="18">Billy</Name>


-XSL file -

<?xml version="1.0"?>">

<xsl:output method="text"/>

<xsl:variable name="newline">



<xsl:variable name="space">

<xsl:text> </xsl:text>


<xsl:template match="/">

<xsl:for-each select="List/Name">

<xsl:value-of select="."/>

<xsl:value-of select="$space"/>

<xsl:value-of select="@age"/>

<xsl:value-of select="$newline"/>




In java app:

-Output file (DesJava.txt) ->(Right result)

Sandy 20

Sue 23

Billy 18

In Web Dynpro:

-Output file (DesWebDynpro.txt) ->(Wrong result)

Sandy 20Sue 23Billy 18

All above shows, in Web Dynpro the Carriage Return symbol is dismissed.

Anybody know the reason and the solution to solve this problem?