need clarifications on XPath vs pattern match

Didier PH Martin martind at
Mon Dec 13 22:18:37 GMT 1999

Hi Lisa

Lisa said:
1) No, you are not wrong to think that it CAN be an XPath expression
But it does not HAVE to be -- it can simply be "matching" an element
name, or attribute name, etc.  An XPath expression can also be used to
make that "match".

Didier reply:
So, you say that a pattern expression can potentially have a different
syntax than an XPath expression or that a pattern match expression could not
be contained in the XPath specs (otherwise it is an XPath expression). Does
this means that I can create my own expression and be compliant with the
specs or that only the pattern match expression mentioned in the specs are
valid. In this last case, it means that the pattern match is quite limited.
Jee, I am having trouble interpreting the specs. Do we need jurisprudence?
if yes who state that the jurisprudence? Why did I woke up this morning,
life was easier in my bed :-))

Since I read your message I read again the specs and saw this text fragments
which lead me to conclude that a pattern match expression is an XPath
expression (I cannot create my own expression - it has to be part of the
XPath specifications - more precisely a subset or any expression that may
lead to a "node-set").

"XSLT uses the expression language defined by XPath [XPath]. Expressions are
used in XSLT for a variety of purposes including:

 - selecting nodes for processing;
 - specifying conditions for different ways of processing a node;
 - generating text to be inserted in the result tree."
"TThe syntax for patterns is a subset of the syntax for expressions. In
particular, location paths that meet certain restrictions can be used as
patterns. An expression that is also a pattern always evaluates to an object
of type node-set. A node matches a pattern if the node is a member of the
result of evaluating the pattern as an expression with respect to some
possible context; the possible contexts are those whose context node is the
node being matched or one of its ancestors."

so, it seems that it is not the full set but it is a subset of XPath as long
as the expression points to an object of type "node-set". I guess that
node-set will be defined in the information set specification. Are they,
Will they? OK now I have a new problem: where a node-set is defined? Yop, I
was feeling better in bed this morning :-))

David where are you? Have you, will you define what a "node-set" is in the
information set specifications?

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