RE: XQuey

Jerome Simeon <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <OF0A85A8DB.40EFCDBC-ON85256E55.00657FC9-85256E55.006665B0@us.ibm.com>




Sorry, I keep trying to understand why XPath works the way it does. I
should have learned my
lesson by now...
I agree that Mary's new normalization is correct.
- Jerome




                                                                           
             "Michael Kay"                                                 
             <[email protected]>                                               
             Sent by:                                                   To 
             www-ql-request@w3                                             
             .org                      Jerome Simeon/Watson/IBM@IBMUS      
                                                                        cc 
                                       "'Jan Hidders'"                     
             03/10/2004 09:33          <[email protected]>, "'Jan       
             AM                        Paredaens'"                         
                                       <[email protected]>, "'Mary    
                                       Fernandez'" <[email protected]>, 
                                       "'Philippe Michiels'"               
                                       <[email protected]>,       
                                       <[email protected]>                     
                                                                           
                                                                           
                                                                           
                                                                           
                                                                   Subject 
                                       RE: XQuey                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




The XPath 1.0 specification said that attributes were not included in the
result of the following axis. I see no reason to change that.

Michael Kay


From: Jerome Simeon [mailto:[email protected]]
Sent: 10 March 2004 14:11
To: Michael Kay
Cc: 'Jan Hidders'; 'Jan Paredaens'; 'Mary Fernandez'; 'Philippe Michiels';
[email protected]
Subject: RE: XQuey


Shouldn't it also contains some attributes nodes from the same element
which are
considered (by that implementation) to be after that attribute node to be
in document order?

For instance,

let $x := <a b="1" c="2"/> return
$x/@b/following::node()

may return either () or the attribute 'c', depending on how the
implementation deals with
document order?
- Jerome





                                                                           
 "Michael Kay"                                                             
 <[email protected]                                                            
 >                                                                         
                                                                        To 
                     "'Mary Fernandez'" <[email protected]>, "'Jan      
 03/10/2004          Paredaens'" <[email protected]>                  
 05:21 AM                                                               cc 
                     Jerome Simeon/Watson/IBM@IBMUS, <[email protected]>,      
                     "'Jan Hidders'" <[email protected]>, "'Philippe    
                     Michiels'" <[email protected]>               
                                                                   Subject 
                     RE: XQuey                                             
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





# 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() = ()
#

The XPath 1.0 definition is:

"the following axis contains all nodes in the same document as the context
node that are after the context node in document order, excluding any
descendants and excluding attribute nodes and namespace nodes"

(The accepted meaning of "any descendants" is "descendants of the context
node", while the accepted meaning of "attribute nodes and namespace nodes"
is "all attribute and namespace nodes")

This definition means that the following axis, starting at an attribute,
includes the children of the element containing that attribute.

Michael Kay
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.