Subject: RE: template match : node-set paring through multiple-axis relationships
From: Américo Albuquerque <melinor@xxxxxxx>
Date: Wed, 4 Jun 2003 18:52:11 +0100
|
Hi.
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Jonathan Sprinkle
> Sent: Wednesday, June 04, 2003 3:21 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: template match : node-set paring through
> multiple-axis relationships
>
>
> > Try this:
> > <!-- get all 'b's -->
> > <xsl:key name="Bs" match="b" use="'B'"/>
> >
>
> Hi (Americo?)
Yes, my name is Americo :)
>
> This is very interesting, could you tell me more about in
> what context this 'b' is selected? I would guess it has to
> be from the root node context, but I do not understand why
> there is no '//' prefix. This is a very interesting solution
> that I will examine further,
>
You could compare <xsl:key name="whatever" match="b" use="c"/>
To
whatever.xsl:
<xsl:stylesheet ...>
<xsl:template match="b[c]">
Result of key usage :)
</xsl:template>
</xsl:stylesheet>
Since keys can't be selected before matched as templates can, it has the
same effect has using match="//b"
Hope this helps you
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|