Subject: RE: Immediately preceding-sibling
From: Americo Albuquerque <melinor@xxxxxxxx>
Date: Mon, 20 Oct 2003 17:51:07 +0100
|
Hi
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> John Marshall
> Sent: Monday, October 20, 2003 5:02 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: Immediately preceding-sibling
>
>
> How about:-
>
> <xsl:template match="line">
> <xsl:apply-templates/>
> </xsl:template>
>
> <xsl:template match="word">
> <xsl:value-of select=".">
> <xsl:if test="following-sibling!=nospace">
This test is wrong. Here you are looking for a following-sibling node,
that doesn't exists
Use <xsl:if test="following-sibling::*[1][not(self::nospace)]"> instead.
> <xsl:text> </xsl:text>
> </xsl:if>
> </xsl:template>
>
> <xsl:template match="nospace">
> <xsl:text>_</xsl:text>
> </xsl:template>
>
(...)
Regards,
Americo Albuquerque
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
Jeff Beadle - Mon, 20 Oct 2003 11:28:11 -0400 (EDT)
John Marshall - Mon, 20 Oct 2003 12:02:35 -0400 (EDT)
- Americo Albuquerque - Mon, 20 Oct 2003 12:54:18 -0400 (EDT) <=
|
|