[Home] [By Thread] [By Date] [Recent Entries]
Luke Jones wrote:
<xsl:template match="covers"> [<xsl:apply-templates select="normalize-space(covers)" />] </xsl:template> One thing puzzles me here. Do you really want to match a node that looks like this: covers/covers Likely, you want to match the node 'covers/*' or similar (not sure). Are there templates that need to be applied? I assume so, because you add the comma from some place. If indeed the xpath is incorrect, try this: <xsl:template match="covers"> [<xsl:apply-templates select="normalize-space(*)" />] </xsl:template> When I leave out the select portion of the expression I get [ LB 101, LR 1332 ]. What I want is [LB 101, LR 1332]. Is the normalize-space function the way to go to achieve this? You are doing it the right thing. However, be aware that normalize-space() also "folds" all other space nodes. That means that the following: <node> this is text with spaces </node> becomes: <node>this is a text with spaces</node> It that is what you want, it will work. Cheers, -- Abel Braaksma http://www.nuntia.com
|

Cart



