Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XSLT transformation and Line Breaks

853060Apr 5 2011 — edited Apr 26 2011
Hello!
I'm trying to generate a XML similiar to this one:

<test>Line1
Line2</test>

where there's a line break inside a XML tag.

If I assign this to a variable, it works fine: <test>{fn:concat("Line1", fn:codepoints-to-string((13,10)), "Line2")}</test>

But I want to do this using XSLT. I'm using this variable to hold line break chars: <xsl:variable name="cLineEnd" select="'&#13;&#10;'"/>

But when OSB does the transformation, it replaces these chars by x20 (space) char.

If I do the same transformation using Visual Studio, it works fine. (sorry about the bad names, guys).

The workaround I found is to do all the transformations using XSLT, but having cLineEnd = "##LineBreak##" and then adding another replace step like this:

fn:replace($body/text(), '##LineBreak##', fn:codepoints-to-string((13,10)))

As you can see, not the proper way...

Any ideas?

Thanks in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2011
Added on Apr 5 2011
5 comments
5,845 views