This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4920 - IdentityConstraint tests: valid xpath combinations no accepted
Summary: IdentityConstraint tests: valid xpath combinations no accepted
Status: RESOLVED INVALID
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-07 18:53 UTC by Michael Chan
Modified: 2010-04-23 15:46 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Chan 2007-08-07 18:53:11 UTC
Testcases affected:
msData/identityConstraint/idI014.xsd
msData/identityConstraint/idI016.xsd
msData/identityConstraint/idI022.xsd
msData/identityConstraint/idJ015.xsd
msData/identityConstraint/idJ017.xsd
msData/identityConstraint/idJ030.xsd

According to the "3.11.6 Constraints on Identity-constraint Definition Schema Components", the above schemas have valid xpath combinations and should be tested using valid scenarios.
Comment 1 Henry S. Thompson 2010-02-05 11:47:13 UTC
14 and 16 at least look to me to have unbound ns prefixes in their XPaths, but 
I agree that 22 looks OK -- needs careful review
Comment 2 Henry S. Thompson 2010-02-05 11:49:26 UTC
Hmmm, re-reading the XPath whitespace rules leaves me less sure about 22 -- 
care is clearly  needed here
Comment 3 David Ezell 2010-03-19 15:42:04 UTC
Michael Kay will run these tests through his processor and report the results.
Comment 4 Michael Kay 2010-03-19 16:15:04 UTC
Saxon reports all these tests as invalid. They all fail for the same reason: whitespace is used where it is not allowed, either within a NameTest or within the token "//". Specifically, the offending lines are:

I014:
<xsd:selector xpath="tid :*"/>

I016:
<xsd:selector xpath="tid : *"/>

I022:
<xsd:selector xpath="./ /."/>

J015:
<xsd:field xpath="xpns :*"/>

J017:
<xsd:field xpath="xpns : *"/>

J030:
<xsd:field xpath="./ /."/>

XPath 1.0 does not allow a space in the middle of these constructs (NameTest and // are both tokens). XSD 1.0 says the same thing. The relevant rules are in 3.11.6:

<quote>
For readability, whitespace may be used in selector XPath expressions even though not explicitly allowed by the grammar: whitespace may be freely added within patterns before or after any token.
[5] token ::= '.' | '/' | '//' | '|' | '@' | NameTest
[6] whitespace ::= S
</quote>
Comment 5 David Ezell 2010-04-23 15:45:29 UTC
WG decided that the tests, marked as invalid, are appropriately so marked.