unicode numbers suddenly apearing in output

Here should go questions about transforming XML with XSLT and FOP.
shaun roe
Posts: 1

unicode numbers suddenly apearing in output

Wed Aug 31, 2005 12:51 pm

I have a strange problem. I am halfway through a transform which goes well but suddenly starts to produce character codes in the output for the quotation and tab keys. e.g.

<channel id="2" MUR="3029"&#xA; " module="4"&#xA; "/>

This was generated by the following xslt (only fragment shown):

<xsl:element name="channel">
<xsl:attribute name="id">
<xsl:value-of select="value[@name='channelId']"/>
</xsl:attribute>
<xsl:attribute name="MUR">
<xsl:value-of select="value[@name='MUR']"/>"
</xsl:attribute>
<xsl:attribute name="module">
<xsl:value-of select="value[@name='module']"/>"
</xsl:attribute>
</xsl:element>

operating on this bit of xml:

<channel id="2">
<value name="channelId">2</value>
<value name="MUR">3029</value>
<value name="module">4</value>
</channel>

Note that the channelId was parsed correctly and output, but the others got mysterious character codes added for the quote and tab. (and the quote is the codepoint in decimal, whereas the tab is in hex... who ordered that?)

whats going on?[code][/code]
Radu
Posts: 6001

Wed Aug 31, 2005 1:28 pm

Hi,

You have residual quotes in your stylesheet which are escaped in the output.
Just try deleting the quotes after the xsl:value-of element like in:

Code: Select all

 <xsl:value-of select="value[@name='module']"/>"
should go to:

Code: Select all

 <xsl:value-of select="value[@name='module']"/>


Regards, Radu.

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 0 guests