need clarifications on XPath vs pattern match

Didier PH Martin martind at
Tue Dec 14 00:42:26 GMT 1999

Hi Michael,

Michael said:
Not quite. See XSLT, section 5.2:
    "A pattern must match the grammar for Pattern. A Pattern is a set of
    location path patterns separated by |. A location path pattern is a
    location path whose steps all use only the child or attribute axes.
    Although patterns must not use the descendant-or-self axis, patterns
    may use the // operator as well as the / operator. Location path
    patterns can also start with an id or key function call with a literal
    argument.  Predicates in a pattern can use arbitrary expressions just
    like predicates in a location path."

This paragraph is followed by a grammar spelling out the above.
See also XPath, section 2 "Location Paths".

Didier reply:
so, basically a pattern match could be a collection of XPath location path
Can we say that?

Michael said:
"Node-sets" are defined in XPath, section 3.3:
    "A location path can be used as an expression. The expression returns
    the set of nodes selected by the path."

Didier says:
I expected a better definition. don't you? Obviously the name node-set
convey implicitly the meanings of node and set. A set being a collection,
then we can say that a node-set is a collection of nodes. However, I
expected something more formal for something which is as fundamental. Again,
David, have we, or will we have a more formal definition of node-set in
information sets?

Michael said:
Bottom line: you can't fully understand the XSLT spec. w/o first
understanding XPath. (Arguably, the reverse is true also. ;-)

Didier reply:
Yes I noticed :-)

Didier PH Martin
mailto:martind at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list