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.
Instead of a keyboard space, have a no-break space instead:
<xsl:text> </xsl:text>
or
<xsl:text> </xsl:text>