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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: need clarifications on XPath vs pattern match

[ Lists Home | Date Index | Thread Index ]
  • From: Lisa Rein <lisarein@finetuning.com>
  • To: Michael Fuller <msf@mds.rmit.edu.au>
  • Date: Mon, 13 Dec 1999 17:11:03 -0800

okay so is the conclusion of all of this is that:

1) XSLT's patterns MUST be XPath expressions  

and also

2) I was WRONG when I said that was not the case earlier because:

Even when the value of a simple match pattern is nothing more than an
element name, that in itself is an XPath expression (being evaluated
from the root element, by default -- unless another context is
explicitly stated somewhere in the stylesheet).

I just want to make sure that this is a done deal.  It's a pretty big
issue for there to be confusion about, if ya think about it. When I
realized I couldn't say "yes" or "no" without thinking for a minute, I
was a bit surprised.  It should be a simple question with a simple yes
or no answer. This isn't one of those gray areas, is it?

With all that in mind, I ask again to the group:  
Are we all in agreement here?  (with the above statements 1 & 2 above)

Just checking :-)

thanks,

lisa

Michael Fuller wrote:
> 
> Didier PH Martin wrote [re. XSLT patterns vs XPath expressions]:
> > 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".
> 
> 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".
> 
> > 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?
> 
> "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."
> 
> > Yop, I was feeling better in bed this morning :-))
> 
> Me too.
> 
> Bottom line: you can't fully understand the XSLT spec. w/o first
> understanding XPath. (Arguably, the reverse is true also. ;-)
> 
> Michael
> --
> http://www.mds.rmit.edu.au/~msf/
> Multimedia Databases Group, RMIT, Australia.
> 
> 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/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe 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)

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/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe 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