This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [Stylesheets] Adding a text the *first* time youencounter a given element?
- From: Jirka Kosek <jirka at kosek dot cz>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: 'Stephane Bortzmeyer' <bortzmeyer at nic dot fr>, docbook-apps at lists dot oasis-open dot org
- Date: Wed, 12 Feb 2003 16:44:21 +0100
- Subject: Re: DOCBOOK-APPS: [Stylesheets] Adding a text the *first* time youencounter a given element?
- References: <E08C8F26F6901D42B1201763D125853815B527@ntdevexc.win.ansys.com>
Jeff Beal wrote:
>
> Try using
> <xsl:template match="//rfc[1]">
> <!-- Add link to RFC here -->
> </xsl:template>
>
> I'm not totally sure this will work, but I think since the match is on the
> /descendant-or-self axis of the root node, this will only match on the first
> rfc element in the document.
In attribute match there is XPath pattern and it is evaluated in a
slightly different way than XPath expression. I think that writing
//rfc[1] and rfc[1] in match attribute is same and thus it won't work.
I'm almost 98 % sure :-)
Jirka
--
-----------------------------------------------------------------
Jirka Kosek
e-mail: jirka@kosek.cz
http://www.kosek.cz