This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Not So Newbie XPath Question
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Not So Newbie XPath Question
- From: Bernard Harrison <b_harrison at primus dot com dot au>
- Date: Tue, 20 Feb 2001 01:49:22 +1100
- References: <9B66BBD37D5DD411B8CE00508B69700F4F027E@pborolocal.rnib.org.uk>
- Reply-To: xsl-list at lists dot mulberrytech dot com
DPawson@rnib.org.uk wrote:
>
> <?xml version = '1.0' encoding = 'utf-8'?>
> <!DOCTYPE xsl:stylesheeet
> [
> <!ENTITY nl "<xsl:text>

</xsl:text>">]>
>
> <xsl:stylesheet version='1.0'
> xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
> xmlns:saxon="http://icl.com/saxon"
> >
>
> <xsl:output method="text"/>
>
>
> <xsl:template match="/">
> <xsl:apply-templates/>
> </xsl:template>
>
> <xsl:template match="z[a]">
> <xsl:if test="a">
> <xsl:apply-templates select="a"/>
> </xsl:if>
>
> </xsl:template>
>
> <xsl:template match="a[not(following-sibling::a)]" >
> <xsl:value-of select="name(following-sibling::*[1])"/>
> </xsl:template>
>
> </xsl:stylesheet>
> I'm sure it could be simplified.
> hth DaveP
Mmm. Does using following-sibling work given Jeni Tennison's Post?
Jeni Tennison wrote:
> This will only work in a select expression because match patterns
> don't allow following-sibling:: axes. For a match pattern, you need
> something like you have already or one of its equivalents, like:
Bern
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list