OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: xsl query or transformation language

[ Lists Home | Date Index | Thread Index ]
  • From: James Clark <jjc@jclark.com>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 02 Sep 1998 10:55:22 +0700

Paul Grosso wrote:

> I would disagree with Henry that pattern matching is querying in any
> useful, usual sense of the word.  If there is a "query" (in the
> non-technical sense of the word) at all here, it's "given a node in
> the source document tree, what construction rule's pattern best matches
> the given node's context?"  I don't see this as "returning" anything
> in the usual sense, and I don't think it's helpful to confuse this
> with what most people think of as queries even if the syntax of
> match patterns is similar to (or even the same as) the syntax of
> select patterns (which is what Henry discusses below).

I think it's possible and desirable to think of match patterns as
queries, because select patterns are definitely queries and it's highly
desirable to have a unified semantic model for both uses of patterns.

If you say that a node matches a match pattern if the node is in the set
returned by evaluating the match pattern as a query with the input set
as all the nodes in the document, everything works out fine.

For example, "foo" as a query returns the nodes that are children of
nodes in the input set and that are of type "foo". When used as a select
pattern, the input node set is the current node, so it returns the
children of the current node of type foo.  When used as a match patterm,
the input nodes set is all the nodes in the document, so it matches the
all nodes of types "foo" (this works for the document element since that
is a child of the root).

James



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS