Fix for bug showing up in Candale
Posted by mholmes on 25 May 2010 in Activity log
LCC reported a problem with the Candale texts, which showed up recently -- we don't know what actually caused it to appear now, since the relevant part of the text has apparently not changed, but his is the bug profile:
The content of the document has this:
<fw type="sig" place="bot-center" rend="text-align: center; margin-left: auto; margin-right: auto;">I. Part.<space quantity="4" unit="em"/>A</fw>
This is the XSLT which creates the error:
<xsl:variable name="fwContent" select="normalize-space(./text())"/>
The input to normalize-space()
becomes a sequence of text nodes, which is not allowed; you get the error "A sequence of more than one item is not allowed as the first argument of normalize-space()". This is a working solution:
<xsl:variable name="fwContent"><xsl:value-of separator=" " select="normalize-space()"/></xsl:variable>