- From: Kay, Michael <Michael.Kay@softwareag.com>
- Date: Fri, 30 Jan 2004 12:06:34 +0100
- To: "Roger L. Costello" <costello@mitre.org>, <public-qt-comments@w3.org>
To try and amplify Scott's response, note that OrExpr is an expression that *might* contain an "or" operator, not an expression that *must* contain an "or" operator. To simplify the grammar, when you have a series of rules such as: OrExpr ::= AndExpr ("or" AndExpr)* AndExpr ::= ArithExpr (("+"|"-") ArithExpr)* ArithExpr ::= PathExpr then every PathExpr is an ArithExpr, and every ArithExpr is an AndExpr, and every AndExpr is an OrExpr, and therefore you can use a PathExpr everywhere an OrExpr is allowed, which means you can use it in the "satisfies" clause of a quantified expression. Michael Kay > -----Original Message----- > From: public-qt-comments-request@w3.org > [mailto:public-qt-comments-request@w3.org] On Behalf Of Roger > L. Costello > Sent: 29 January 2004 19:09 > To: public-qt-comments@w3.org; Costello,Roger L. > Subject: [XPath] Legal vaues for a satisfies expression in a > quantifier? > > > > Hi Folks, > > [If this has already been answered, or this is not the > appropriate venue for the question then please direct me to > the appropriate place.] > > In the latest XPath 2.0 spec it defines a quantified expression as > follows: > > QuantifiedExpr ::= (("some" "$") | ("every" "$")) VarName > "in" ExprSingle ("," "$" VarName "in" ExprSingle)* > "satisfies" ExprSingle > > And ExprSingle is defined as follows: > > ExprSingle ::= ForExpr > | QuantifiedExpr > | IfExpr > | OrExpr > > I do not believe that this is correct. Here is one of the > examples that is given in the discussion on quantified > expressions: > > every $part in //part satisfies $part/@discounted > > The satisfies expression in the example is: $part/@discounted > > Clearly, it is neither a ForExpr, a QuantifiedExpr, an > IfExpr, nor an OrExpr. > > In fact, wherever SingleExpr appears in the quantified > expression it makes no sense. > > Can someone provide the correct BNF for the quantified > expression? /Roger > > > > > > >
Received on Friday, 30 January 2004 06:07:10 UTC