This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
According to the errata: http://www.w3.org/2001/05/xmlschema-errata.html#e1-6 whitespace is now allowed between tokens in xpaths. The patterns in the schema for schema have not been updated to reflect this. See: http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JanMar/0044.html
Discussed at the 2003-08-31 telecon to classify as an error with erratum, and instruct the editors to fix the pattern.
*** Bug 4950 has been marked as a duplicate of this bug. ***
I would assume the following shell script should give correct patterns to fix both this issue here and bug 2122. S="\\s*" NCName='[^\I:][^\C:]*' QName="${NCName}:${NCName}" NameTest="(child::${S})?(${NCName}:)?(${NCName}|\\*)" Step="${S}(\\.|${NameTest})${S}" Path="(${S}\\.${S}//)?${Step}(/${Step})*" Selector="${Path}(\\|${Path})*" echo "selector: ${Selector}" LastStep="${Step}|${S}(@|attribute::)${S}${NameTest}${S}" Path="(${S}\\.${S}//)?(${Step}/)*(${LastStep})" Selector="${Path}(\\|${Path})*" echo "field: ${Selector}" With some linebreaks added, the resulting patterns look as follows. selector: (\s*\.\s*//)?\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s* (/\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*)* (\|(\s*\.\s*//)?\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s* (/\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*)*)* field: (\s*\.\s*//)?(\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*/)* (\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s* |\s*(@|attribute::)\s*(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*)\s*) (\|(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*/)* (\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s* |\s*(@|attribute::)\s*(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*)\s*))*