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 2358 - Constr-inscope-1-4 depend on namespace prefixes
Summary: Constr-inscope-1-4 depend on namespace prefixes
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.7.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
: 2359 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-18 17:48 UTC by Michael Kay
Modified: 2005-10-27 17:22 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-10-18 17:48:40 UTC
notationschema is not a valid schema. The enumeration values should be
namespace-qualified. For example XSV says:

XSV 2.10-1 of 2005/04/22 13:10:49
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:4,7: element content
failed type check: myns:jpeg not in enumeration [jpeg, png]
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:5,7: element content
failed type check: foo:jpeg not in enumeration [jpeg, png]
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:6,7: element content
failed type check: myns:jpeg not in enumeration [jpeg, png]
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:7,7: element content
failed type check: myns:png not in enumeration [jpeg, png]

while Xerces reports:

file:///c:/MyJava/tests/xqts070/TestSources/notationschema.xsd:20,42: (Error)
src-resolve.4.1: Components with no namespace are not referenceable from schema
document 'file:///c:/MyJava/tests/xqts070/TestSources/notationschema.xsd'.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:4,39: (Error)
cvc-enumeration-valid: Value 'myns:jpeg' is not facet-valid with respect to
enumeration '[jpeg, png]'.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:4,39: (Error)
cvc-type.3.1.3: The value 'myns:jpeg' of element 'NOTATION1' is not valid.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:5,38: (Error)
cvc-enumeration-valid: Value 'foo:jpeg' is not facet-valid with respect to
enumeration '[jpeg, png]'.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:5,38: (Error)
cvc-type.3.1.3: The value 'foo:jpeg' of element 'NOTATION2' is not valid.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:6,39: (Error)
cvc-enumeration-valid: Value 'myns:jpeg' is not facet-valid with respect to
enumeration '[jpeg, png]'.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:6,39: (Error)
cvc-type.3.1.3: The value 'myns:jpeg' of element 'NOTATION3' is not valid.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:7,38: (Error)
cvc-enumeration-valid: Value 'myns:png' is not facet-valid with respect to
enumeration '[jpeg, png]'.
file:///c:/MyJava/tests/xqts070/TestSources/notation.xml:7,38: (Error)
cvc-type.3.1.3: The value 'myns:png' of element 'NOTATION4' is not valid.
Xerces Java 2 Validation Complete.

Michael Kay
Comment 1 Michael Kay 2005-10-18 18:21:03 UTC
Tests Constr-inscope-1 to -4 cause the system to generate arbitrary namespace
prefixes. The rules for the XML comparator result in a "fail" result if the
namespace prefixes generated are different from those in the expected results.

A possible solution here is to put the query results through a further
transformation whose result doesn't depend on the actual prefixes. For example,
it could do count(distinct-values(in-scope-prefixes())).

Michael Kay
Comment 2 Andreas Behm 2005-10-20 22:21:14 UTC
I updated to notationschema, enumeration values are namespace-qualified.

As for Constr-inscope-1-4, the comparator is "Inspect", so it is up to you
to make the choice for correctness of the result.
The inscope-namespace() function is not an options since the feature is
not in our foundation list.
Comment 3 Andreas Behm 2005-10-20 22:21:40 UTC
*** Bug 2359 has been marked as a duplicate of this bug. ***
Comment 4 Michael Kay 2005-10-21 15:18:03 UTC
OK, I missed the "inspect".

Can you explain the concept "our foundation list"? Who does "our" refer to?
Comment 5 Andrew Eisenberg 2005-10-27 17:22:09 UTC
The Guidelines for XML Query Test Suite Submissions
(http://www.w3.org/XML/Query/test-suite/Guidelines%20for%20Test%20Submission.html)
contains a table that is introduced by the following bullet:


"Submitted tests for a particular section must include only functionality
defined by that section and by the provided foundation features. The XML Query
Working Group defines the following features as foundation features:"