0x5C91
0x5C91

Reputation: 3515

Preserve whitespace in XSLT transformation in Oracle SOA Suite 11g

I'm trying to assign a single whitespace in an XSLT transformation in Oracle SOA Suite 11g, but so far I've had no luck.
My SOA application is deployed on a Weblogic server. Here's what I've tried to do:

<imp1:myElement>
  <xsl:text> </xsl:text>
</imp1:myElement>

and

<imp1:myElement>
  <xsl:value-of select="string(' ')" disable-output-escaping="yes"/>
</imp1:myElement>

I also tried with disable-output-escaping="no". I even tried with:

<xsl:preserve-space elements="blank"/>
<xsl:variable name="blank" select="string(' ')" />
...
<imp1:myElement>
  <xsl:copy-of select="$blank"/>
</imp1:myElement>

None of the above have worked. I'm aware that a bug exists, but the workaround described in the link (corresponding to the second solution that I've posted) doesn't work, it only changes the result from

<imp1:myElement/>

to

<imp1:myElement></imp1:myElement>

but still without the whitespace.

Does anyone know a solution? Thanks in advance.

Upvotes: 0

Views: 1074

Answers (2)

Kris Unnikannan
Kris Unnikannan

Reputation: 11

I have used the following in xsl 1.0 and Oracle SOA 11.1.1.7

<xsl:text>&nbsp;</xsl:text>

Upvotes: 0

Joel M. Lamsen
Joel M. Lamsen

Reputation: 7173

Instead of a keyboard space, have a no-break space instead:

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

or

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

Upvotes: 2

Related Questions