xsl-list
[Top] [All Lists]

RE: template match : node-set paring through multiple-axis relationships

2003-06-04 10:52:11
Hi.

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Jonathan Sprinkle
Sent: Wednesday, June 04, 2003 3:21 PM
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: RE: [xsl] 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