RE: XQuey

"Michael Rys" <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <EB0A327048144442AFB15FCE18DC96C7024A2C03@RED-MSG-31.redmond.corp.microsoft.com>
I am not sure that the answer is compatible with XPath 1.0.

If I interpret XPath 1.0 semantics correctly, the result for
$x/@attr/following-sibling::node() should be <b/> (and similar for the
other expression).

Best regards
Michael

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
Of
> Mary Fernandez
> Sent: Tuesday, March 09, 2004 1:09 PM
> To: Jan Paredaens
> Cc: Jerome Simeon; [email protected]; Jan Hidders; Philippe Michiels
> Subject: Re: XQuey
> 
> 
> Dear Jan,
> 
> The example you give below:
> 
> <elem attr="g"> <b/> </a>
> 
> is not a well-formed element, so I am not exactly sure what
> the input value is.  I'm going to assume you meant
> that b is a child of the element a:
> 
> let $x := <a attr="g"/><b/></a>
> 
> So then the values of the following expressions are:
> 
> $x/@attr/following-sibling::node() = ()
> $x/following-sibling::node() = ()
> 
> I agree that the prose and formal meanings  of the following
expression
> conflict, but I believe the formal semantics is the correct one, i.e.,
> 
> $x/@attr/following::node() = ()
> 
> Thanks for pointing out this problem.  I will raise with the group
> but would appreciate you posting your remark to
> [email protected]
> 
> Thanks,
> Mary
> 
> > the following-sibling axis contains the context node's following
> siblings,
> > those children of the context node's parent that occur after the
context
> > node in document order; if the context node is an attribute node or
> > namespace node, the following-sibling axis is empty
> >
> > the ancestor-or-self axis contains the context node and the
ancestors of
> > the context node;
> >
> > the following axis contains all nodes that are descendants of the
root
> of
> > the tree in which the context node is found, are not descendants of
the
> > context node, and occur after the context node in document order
> 
> > Consider now for instance:
> >
> > <elem attr="g"> <b/> </a>
> >
> > clearly
> >
> > <elem>/@attr/following-sibling::node() = empty,
> > <elem>/following-sibling::node() = empty,
> > and <elem>/@attr/following::node() = <b/>
> >
> > But in
> >
> > http://www.w3.org/TR/2004/WD-xquery-semantics-20040220/#sec_axes
> >
> > 4.2.1.1 is written
> >
> > [following:: NodeTest] ==
> > [ancestor-or-self::node()/following-sibling::node()
> >  /descendant-or-self::NodeTest]
> >
> > Hence by this definition we have
> >
> > <elem>/@attr/following::node() = empty.
> >
> > Can you agree with this inconsistency?
> >
> > Jan Paredaens
> > Philippe Michiels
> --
> Mary Fernandez <[email protected]>
> AT&T Labs - Research
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.