W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > August 2002

Re: FW: Qualifiers Question

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Fri, 30 Aug 2002 10:38:26 -0600
To: mgreen@nextance.com
Cc: "Scott Boag" <Scott_Boag@us.ibm.com>, "Paul Cotton" <pcotton@microsoft.com>, www-xml-query-comments@w3.org
Message-ID: <OFFA02C9DF.580E55E7-ON88256C25.005A5CF3@us.ibm.com>
Hi Margaret,
Here's a partial parse of the expression you asked about, using the 
grammar in the April 30 XQuery publication. (Note that a new version of 
this publication was released on August 16).

empty  (  $proc  //  anesthesia  [  .  precedes  $i  ]  )

empty  (  $proc  //  anesthesia  [  StepExpr precedes PrimaryExpr  ]  )

empty  (  $proc  //  anesthesia  [  OrderComp  ]  )

empty  (  $proc  //  anesthesia  [  Expr  ]  )

empty  (  $proc  //  anesthesia  Qualifiers  )

empty  (  $proc  //  nametest  Qualifiers )

empty  (  $proc  //  AbbreviatedForwardStep  Qualifiers )

empty  (  $proc  //  StepExpr  )

empty  (  PrimaryExpr  //  Expr  )

empty  (  RelativePathExpr  )

FunctionCall

 
Hope this helps,
--Don Chamberlin



-----Original Message-----
From: Margaret Green [mailto:mgreen@nextance.com] 
Sent: Wednesday, June 12, 2002 9:23 PM
To: www-xml-query-comments@w3.org
Subject: Qualifiers Question
 
Hello,
 
I have an XQuery grammar question. From the current working document,
http://www.w3.org/TR/2002/WD-xquery-20020430 
The example in question:
 
Section 4.4 Queries on Sequence
the third example 
 
for $p in //procedure
where some $i in $proc//incision satisfies
        empty($proc//anesthesia[. precedes $i])
return $p
 
 
 
I believe $proc//anesthesia matches the relative path expression: 
RelativePathExpr
 
For the Qualifiers predicate that follows it, [. precedes $i]   I can find 
no expression that would match.
 
The parse at that point has identified ???.. PrimaryExpr  -> FunctionCall 
-> RelativePathExpr
 
FunctionCall would have to consume its' right paren before PrimaryExpr 
could match Qualifiers
 
The RelativePathExpr is idendtifying a sequence of nodes and Qualifiers 
predicate filters node sequences. So I think the example is right. Am I 
missing something or is the grammar? Enlighten me please.
 
 
Margaret Green
 
Received on Friday, 30 August 2002 12:39:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 February 2007 00:13:05 GMT