- From: Stefan Wachter <Stefan.Wachter@gmx.de>
- Date: Wed, 20 Nov 2002 13:57:42 +0100 (MET)
- To: xmlschema-dev@w3.org
Hi all. After reading the specification for selector and field XPaths I am not sure what kind of XPaths are actually allowed. I think that this point needs clarification. 1. The spec. defines BNFs for the valid XPaths. However, it also states (at 2.2) that XPaths whose abbreviated forms correspond to the BNFs are also valid with the restriction that only the 'child' (and 'attribute' axes in case of fields) are used. Yet, the BNFs also use the 'self' and the 'descendant-or-self' axes. Therefore I think that these axes should also be allowed for the XPaths covered by (2.2). 2. The BNFs allow the '//', i.e. a 'descendant-or-self' step only at the beginning. I think this restriction is not necessary because it does not ease implementations and is conceptually not justified. 3. The 'descendant' axis should also be allowed. To summarize I propose the following BNFs for selector and field XPaths: RelLocPath := Step | (RelLocPath '/' Step) | (RelLocPaht '//' Step) Step := (AxisSpecifier? NodeTest) | '.' AxisSpecifier := 'self' | 'child' | 'descendant' | 'descendant-or-self' NodeTest := '*' | (NCName ':' '*') | QName | 'node()' Selector := RelLocPath ( '|' RelLocPath)* FieldLocPath := (RelLocPath ('/' | '//'))? (Step | AttributeStep) AttributeStep = ('attribute::' | '@') NameTest Field := FieldLocPath ( '|' FieldLocPath )* This definition describes a superset of the XPaths allowed with respect to the current BNFS. Therefore it could be used for the XMLSchema 1.1 specification. --Stefan
Received on Wednesday, 20 November 2002 07:58:07 UTC