RE: top-level location-path context dependencies

Thank you, Mike. It's much better to know than not!
Howard

> -----Original Message-----
> From: Michael Kay [mailto:mhk@mhk.me.uk]
> Sent: Sunday, April 18, 2004 2:22 PM
> To: 'Howard Katz'; www-ql@w3.org
> Subject: RE: top-level location-path context dependencies
> 
> 
> > 
> > Any reason you couldn't set the context node to be *any* node within a
> > particular document (altho it would likely be a very odd thing to do)?
> 
> Saxon allows you to set the context item to any item whatsoever from the
> Java API, but the command line interface is more restrictive.
> 
> > I think I see it -- maybe. Is the following reasoning correct 
> > then?
> 
> Without checking your logic in detail against the data files, I think you
> have got it right.
> 
> Michael Kay
> 
> 
>  If the
> > environment has set the context item to be the document node 
> > for "bib.xml"
> > [1], for example, you'd get
> > 
> > 1) //title => 4 title elements in "bib.xml"
> > 2) title => no elements (since no <title> element is child of 
> > the context
> > item)
> > 3) /bib => the root bib element
> > 4) bib => ditto
> > 
> > Similarly if the context item has been set to be the document node for
> > "reviews.xml" [2], you'd get
> > 
> > 1) //title => 3 title elements in "reviews.xml"
> > 2) title => no elements (no <title> element is child of the 
> > context item)
> > 3) /bib => no elements (no <bib> element is at the root of 
> > the document
> > containing the context node
> > 4) bib => no elements (no <bib> element is the child of the 
> > context node)
> > 
> > Howard
> > 
> > [1] http://www.w3.org/TR/xquery-use-cases/#xmp-data
> > [2] http://www.w3.org/TR/xquery-use-cases/#xmp-data-q5
> > > >
> > > > It would be very useful to me if somebody could show the
> > > > above results in a tabular fashion
> > >
> > > No table needed: there is no difference between these four cases.
> > 
> > 
> > >
> > > Michael Kay
> > >
> > 
> > 
> 

Received on Sunday, 18 April 2004 22:07:27 UTC