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 13890 - Assertion xpaths starting with '//' should return empty sequence
Summary: Assertion xpaths starting with '//' should return empty sequence
Status: CLOSED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: IBM tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords: disputedTest
Depends on:
Blocks:
 
Reported: 2011-08-24 15:34 UTC by Sandy Gao
Modified: 2011-10-21 16:38 UTC (History)
1 user (show)

See Also:


Attachments

Description Sandy Gao 2011-08-24 15:34:45 UTC
IBM "assertion" tests "d4_3_15v14" and "d4_3_15v15" are expected to be valid. The XPaths use "//":

		<xs:assert test="count(//ele1) eq 1"/>
and
		<xs:assert test="count(//@attr1) eq 1"/>

Based on the clarification from bug 12127, paths starting with '/' or '//' return the empty sequence, which means the above assertions will always fail.
Comment 1 David Ezell 2011-08-26 15:34:57 UTC
MSM: two possible changes -- as formulated, both these should fail.
...: inserting a '.' to the left of the '//' in each case will give the expected result
...: so , leave this test but change the outcome, and add a new test that works as expected.
Comment 2 Sandy Gao 2011-08-26 16:49:02 UTC
Copied original "d4_3_15v14" and "d4_3_15v15" to "d4_3_15ii31" and "d4_3_15ii32" (instance_invalid).

Updated schema for "d4_3_15v14" and "d4_3_15v15" to use "count(.//ele1) eq 1" and "count(.//@attr1) eq 1" respectively.