<?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>30180</bug_id>
          
          <creation_ts>2017-09-11 15:32:58 +0000</creation_ts>
          <short_desc>[xslt30ts] Test case error-0905a - invalid xs:anyURI</short_desc>
          <delta_ts>2017-09-12 23:29:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0 Test Suite</component>
          <version>Proposed Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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="Michael Kay">mike</reporter>
          <assigned_to name="Abel Braaksma">abel.online</assigned_to>
          <cc>abel.braaksma</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>128886</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-09-11 15:32:58 +0000</bug_when>
    <thetext>Test case error-0905a expects error XTDE0905:

[ERR XTDE0905] It is a dynamic error if the string value of the new namespace node is not valid in the lexical space of the datatype xs:anyURI, or if it is the string http://www.w3.org/2000/xmlns/.

The value in question is &quot;####&quot;.

XSD 1.1 states: The value space of anyURI is the set of finite-length sequences of zero or more characters (as defined in [XML]) that ·match· the Char production from [XML].

This is therefore a valid xs:anyURI according to XSD 1.1, therefore no error should be generated if XSD 1.1 is supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128887</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-09-11 15:39:43 +0000</bug_when>
    <thetext>Created variants of the test for XSD 1.0 and XSD 1.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128890</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2017-09-12 17:39:23 +0000</bug_when>
    <thetext>Interestingly, in FO31 the spec writes:

    « For xs:anyURI, the extent to which an implementation validates the lexical 
    form of xs:anyURI is ·implementation-dependent·.»

Not sure if the difference was intentional.

FO31 is more lenient than XSD11, it doesn&apos;t mention the XML Char limitation. 

Perhaps we should add for XTDE0905 that raising this error is implementation dependent, unless it is &quot;http://www.w3.org/2000/xmlns/&quot;.

I also found that in 5.8 we say about Uri References:

    « [Definition: Within this specification, the term URI Reference, unless 
    otherwise stated, refers to a string in the lexical space of the xs:anyURI 
    datatype as defined in [XML Schema Part 2].] Note that this is a wider 
    definition than that in [RFC3986]»

which doesn&apos;t seem to mention XSD 1.1, nor the leniency of xs:anyURI validation in FO31.

If we could, I would prefer that we follow FO31 in making any and all URI References and xs:anyURI mentions implementation-dependent with respect to validation of the validity of the URI (per RFC or per XSD).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128891</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2017-09-12 17:42:51 +0000</bug_when>
    <thetext>&gt; [FO31] doesn&apos;t mention the XML Char limitation.
This could only mean that corner cases like xs:anyURI(&apos;&amp;#xB;&apos;) or xs:anyURI(&apos;&amp;#xD800&apos;) would be legal in FO31 and illegal in XSD11. When XSLT or XPath is used from within XML 1.0, that wouldn&apos;t be possible anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128892</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-09-12 18:52:13 +0000</bug_when>
    <thetext>&gt;FO31 is more lenient than XSD11, it doesn&apos;t mention the XML Char limitation.

It doesn&apos;t need to. The section you cite from (§19.2) is about casting from xs:string, and all characters in an xs:string instance are legal XML Char&apos;s by definition.

&gt;« [Definition: Within this specification, the term URI Reference, unless 
    otherwise stated, refers to a string in the lexical space of the xs:anyURI 
    datatype as defined in [XML Schema Part 2].]

I don&apos;t think it needs to because we have a blanket statement that processors can choose which XSD version to support. But in any case, the definition of &quot;URI Reference&quot; has no bearing on this bug.

The spec issues concerning the precise rules for namespace URIs are one of those areas that the WG has spent a lot of time on, and spending even more time is unlikely to sort out the mess, because the mess is inherited from other specs. So I don&apos;t suggest we attempt it. I&apos;m just trying to fix the test case, which I think fairly clearly depends on which XSD version you&apos;re using.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128893</commentid>
    <comment_count>5</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2017-09-12 23:29:17 +0000</bug_when>
    <thetext>(In reply to Michael Kay from comment #4)
&gt; The spec issues concerning the precise rules for namespace URIs are one of 
&gt; those areas that the WG has spent a lot of time on, and spending even more time 
&gt; is unlikely to sort out the mess, because the mess is inherited from other specs
Makes sense to me.

(In reply to Michael Kay from comment #4)
&gt; I&apos;m just trying to fix the test case, which I think fairly clearly depends on 
&gt; which XSD version you&apos;re using.
Yes, after reading your answer, I wholeheartedly agree. And I forgot about our &quot;blanket statement&quot; on the supported XSD version.

Let&apos;s keep this resolved ;).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>