I am having some issues with the normalize-space() function - basically, extra whitespace is not being trimmed.
Input XML:
Code:
<text:p text:style-name="Text body">
<text:span text:style-name="T1">Agency problem </text:span>A situation in ...</text:p>
XSLT Template:
Code:
<xsl:template match="text:p">
<glossaryterm>
<term><xsl:value-of select="normalize-space(child::text:span/text())"/></term>
<definition><xsl:value-of select="text()"/></definition>
</glossaryterm>
</xsl:template>
If I replace
normalize-space(child::text:span/text()) with
normalize-space(' foobar ') the extra space is trimmed correctly. Any ideas on what I am doing wrong?
Thanks in advance for any help!
Aaron