unicode numbers suddenly apearing in output

Here should go questions about transforming XML with XSLT and FOP.
shaun roe
Posts: 1
Joined: Wed Aug 31, 2005 12:41 pm

unicode numbers suddenly apearing in output

Post by shaun roe » 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 name="MUR">
<xsl:value-of select="value[@name='MUR']"/>"
<xsl:attribute name="module">
<xsl:value-of select="value[@name='module']"/>"

operating on this bit of xml:

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

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?

Posts: 7331
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu » Wed Aug 31, 2005 1:28 pm


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.

Post Reply