This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: simple XSL
- To: xsl-list at mulberrytech dot com
- Subject: Re: simple XSL
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 18 Apr 2000 22:18:23 +0100 (BST)
- References: <023101bfa965$ac08eb80$28140ac0@slick>
- Reply-To: xsl-list at mulberrytech dot com
>
>> <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