This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Stylesheets] Adding a text the *first* time youencounter a given element?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]