Subject: Re: Delimited string-value of elements / text nodes with XSLT 1.0?
From: "B. S." <sbremal@xxxxxxxxxxx>
Date: Mon, 20 Nov 2006 14:23:47 +0000
|
Thank you, both!
Now I have got the idea, ended up basically with this:
...
<xsl:template match="text()">
<xsl:value-of select="." />
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates select="html/body" />
</xsl:template>
...
I'm afraid I completely missed the built-in template for the text(), which
we just actually override here.
Cheers,
Balazs
From: Florent Georges <darkman_spam@xxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Delimited string-value of elements / text nodes with
XSLT 1.0?
Date: Mon, 20 Nov 2006 09:56:22 +0100 (CET)
Dimitre Novatchev wrote:
Hi
> <xsl:template match="text()">
> <xsl:value-of select="concat(., ' ')"/>
> </xsl:template>
Following is another solution, maybe better, and maybe not, depending
on the exact description of the problem (but the overall idea remains
the same):
<xsl:template match="p">
<xsl:value-of select="concat(' ', ., ' ')"/>
</xsl:template>
Regards,
--drkm
___________________________________________________________________________
Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions
!
Profitez des connaissances, des opinions et des expiriences des internautes
sur Yahoo! Questions/Riponses
http://fr.answers.yahoo.com
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
|