<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>8504</bug_id>
          
          <creation_ts>2009-12-16 11:56:29 +0000</creation_ts>
          <short_desc>XQTS: CVS: K2-NameTest-21, K2-NameTest-23 invalid XQueryX</short_desc>
          <delta_ts>2010-03-16 16:08:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>30166</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-12-16 11:56:29 +0000</bug_when>
    <thetext>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.

&lt;xsd:element name=&quot;piTarget&quot; type=&quot;xsd:NCName&quot; minOccurs=&quot;0&quot;/&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30170</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-12-16 12:44:24 +0000</bug_when>
    <thetext>Both tests are documented as being error cases, so why is this a problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30171</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-12-16 13:10:03 +0000</bug_when>
    <thetext>They&apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30174</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-12-16 13:36:42 +0000</bug_when>
    <thetext>&gt;They&apos;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.

&gt;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?


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30177</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-12-16 14:21:34 +0000</bug_when>
    <thetext>&gt;It tests that a processor can handle invalid input - which is surely a
&gt;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&apos;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?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30178</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-12-16 14:37:24 +0000</bug_when>
    <thetext>I agree that it&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30225</commentid>
    <comment_count>6</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2009-12-21 23:44:36 +0000</bug_when>
    <thetext>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.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30739</commentid>
    <comment_count>7</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2010-01-07 20:50:12 +0000</bug_when>
    <thetext>I&apos;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.

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>