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 - New Line/Carriage Return not displaying when deployed

dany36Apr 7 2015 — edited Feb 26 2020

Hello everyone,

I have an XSL Style Sheet that is supposed to transform an XML into plain text using Oracle SOA 11g BPEL transformation. The plain text transformation is working fine, but whenever I try to add a new line or carriage return, the text output doesn't reflect that. I've tried several ways of adding the line break but none of them have worked. This is the XSLT I'm using for testing purposes:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:oracle:b2b:X12/V4010/850" version="1.0">

<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/a:Transaction-850">

<!-- New line -->

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

</xsl:text></xsl:variable>

<xsl:value-of select="a:Internal-Properties/a:Data-Structure/a:Property[@Name='InterchangeUsageIndicator']" />

<xsl:text>&#xd;</xsl:text>

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

<xsl:text>&#xA;</xsl:text>

<xsl:text>&#13;</xsl:text>

<xsl:text>&#10;</xsl:text>

<xsl:text>2000ITITM</xsl:text>

</xsl:template>

</xsl:stylesheet>

When I try it out in an online XSLT test tool, it gives the output as expected:

P

2000ITITM

When I deploy the composite, I noticed that the XSLT in the MDS repository ignores the line breaks, *#xAs, etc. and just closes the <xsl:text/> tags:

<?xml version='1.0' encoding='UTF-8'?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:oracle:b2b:X12/V4010/850" version="1.0">

<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/a:Transaction-850">

<xsl:variable name="newline">

<xsl:text/>

</xsl:variable>

<xsl:value-of select="a:Internal-Properties/a:Data-Structure/a:Property[@Name='InterchangeUsageIndicator']"/>

<xsl:text/>

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

<xsl:text/>

<xsl:text/>

<xsl:text>2000ITITM</xsl:text>

</xsl:template>

</xsl:stylesheet>

And so, because of that, it just gives me the following output:

P2000ITITM

I have no idea why it's ignoring the new line characters, so any guidance would be appreciated.

Thank you all for your help and time!

----

Edit: I tried concatenating as follows:

<xsl:value-of select="concat('36','&#xA;')"/>

<xsl:value-of select="concat('24','&#xD;')"/>

...which shows up as is when I look at it in the MDS repository, however the text output still shows no line breaks...

Message was edited by: dany36

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2015
Added on Apr 7 2015
1 comment
4,690 views