Re: FW: Qualifiers Question

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 UTC