This is the mail archive of the xsl-list@mulberrytech.com mailing list .


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

Re: simple XSL



   >
   >> <xsl:template match="*/C">
   >
   >that is equivalent to 
   ><xsl:template match="C">
   >except it doesn't match the document element.


   really?

yes

   i thought 

   match="*/C" 

   would match all C grandchildren elements

   while

   match="C"

   would match all C children elements


   am i wrong?

no, you are right (and describing the same set of C nodes as me)

the set of C elements for which there exists a node such that the C
element is a grandchild is every C element in the document, except
the top level element (if that is a C). 

The definition of a match  in xsl is just exactly that, that
_some_ (any) node exists, such that taking that node as the current node
the node to be matched is selected by the expression.

so an element C matches match="C" because you can start at the parent
node then select="C" would select the element.

similarly every C element that has a grandparent matches match="*/C".

David



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

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