- From: John Boyer <JBoyer@PureEdge.com>
- Date: Thu, 7 Mar 2002 09:51:52 -0800
- To: "TAMURA Kent" <kent@trl.ibm.co.jp>, <w3c-ietf-xmldsig@w3.org>
Hi Kent, Perhaps you are using an implementation that is not functioning properly. Your general complaint is that the following is illegal: '(' Expr ')' '[' PredicateExpr ']' The parse sequence below illustrates the legality of this XPath expression. Note that the XPath language is rooted by BNF rule #14. For each transformation, the notation -nn-> means that BNF rule nn was used to get from the left hand side to the right hand side. Expr -14-> OrExpr -21-> AndExpr -22-> EqualityExpr -23-> RelationalExpr -24-> AdditiveExpr -25-> MultiplicativeExpr -26-> UnaryExpr -27-> UnionExpr -18-> PathExpr -19-> FilterExpr -20-> FilterExpr Predicate -20-> PrimaryExpr Predicate -15-> '(' Expr ')' Predicate -08-> '(' Expr ')' '[' PredicateExpr ']' From here it is easy to see that Expr can expand to //. | //@* | //namespace::* and that PredicateExpr can expand to things like not(self::comment()). Regards, John Boyer. Ph.D. Senior Product Architect PureEdge Solutions Inc. -----Original Message----- From: TAMURA Kent [mailto:kent@trl.ibm.co.jp] Sent: Wednesday, March 06, 2002 8:18 PM To: w3c-ietf-xmldsig@w3.org Subject: XPath errors in specifications The following XPath expressions are invalid according to XPath 1.0. We can not add a predicate to '('...')'. REC-xml-c14n-20010315: 2.1 (//. | //@* | //namespace::*)[not(self::comment())] 3.7 (//. | //@* | //namespace::*) [ self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node()) ] CR-xml-exc-c14n-20020212: 2.1 (//. | //@* | //namespace::*)[ancestor-or-self::n1:elem1] 2.2 (//. | //@* | //namespace::*)[ancestor-or-self::n1:elem2] In general, (//. | //@* | //namespace::*)[expr] must be (//.[expr] | //@*[expr] | //namespace::*[expr]) -- TAMURA Kent @ Tokyo Research Laboratory, IBM
Received on Thursday, 7 March 2002 12:52:25 UTC