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 8504 - XQTS: CVS: K2-NameTest-21, K2-NameTest-23 invalid XQueryX
Summary: XQTS: CVS: K2-NameTest-21, K2-NameTest-23 invalid XQueryX
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-16 11:56 UTC by Tim Mills
Modified: 2010-03-16 16:08 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2009-12-16 11:56:29 UTC
These two tests are invalid with respect to the XQueryX schema, since neither piTarget 123ncname (K2-NameTest-21) nor prefix:b (K2-NameTest-23) are valid NCName values.

<xsd:element name="piTarget" type="xsd:NCName" minOccurs="0"/>
Comment 1 Michael Kay 2009-12-16 12:44:24 UTC
Both tests are documented as being error cases, so why is this a problem?
Comment 2 Tim Mills 2009-12-16 13:10:03 UTC
They're listed as expecting a type checking error at runtime, rather than failing to parse.  What benefit is there from including invalid XQueryX in the test suite?
Comment 3 Michael Kay 2009-12-16 13:36:42 UTC
>They're listed as expecting a type checking error at runtime, rather than failing to parse.  

No, type errors can be reported either statically or dynamically.

>What benefit is there from including invalid XQueryX in the test suite?

It tests that a processor can handle invalid input - which is surely a reasonable test?


Comment 4 Tim Mills 2009-12-16 14:21:34 UTC
>It tests that a processor can handle invalid input - which is surely a
>reasonable test?

Indeed this is reasonable, but these a
Then this test case should be marked as expecting a parse error in the XQueryX case.  

Our implementation raises a System.Xml.Schema.XmlSchemaValidationException which we report directly - rather than reporing it as XPST0003 which would be inappropriate since this is XQueryX we're dealing with.

(XPST0003: It is a static error if an expression is not a valid instance of the grammar defined in A.1 EBNF)

Or do you suggest that we attempt to observe XPTY0004 by static type analysis of a syntactically invalid XQueryX program?

Comment 5 Michael Kay 2009-12-16 14:37:24 UTC
I agree that it's not really reasonable to expect an XQueryX processor to produce different error codes for different kinds of schema-invalid XQueryX inputs.

To be honest, I've no idea why this one is a type error rather than a static error anyway. It seems a curious decision.

Apart from the error code, it seems a reasonable test to include in the test suite.
Comment 6 Andrew Eisenberg 2009-12-21 23:44:36 UTC
Thanks for pointing this out. From time to time I generate the XQueryX test cases that correspond to new or modified XQuery test cases.

In generating XQueryX test cases, I skip any XQuery test cases that are parse errors and any XQuery test cases that translate to XQueryX documents that do not validate.

K2-NameTest-21 and K2-NameTest-23 generated valid XQueryX at one time. When  errata XQ.E12 (based on Bug #5351) is considered, this is no longer the case.

Sometime in January I plan to regenerate all of the XQueryX test cases. At that time I will remove K2-NameTest-21 and K2-NameTest-23.

Comment 7 Andrew Eisenberg 2010-01-07 20:50:12 UTC
I've updated the XQueryX documents in the test suite and removed the XQueryX for K2-NameTest-21 and K2-NameTest-23.

Please close this bug report if you agree with this resolution.