<?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>29975</bug_id>
          
          <creation_ts>2016-11-02 09:54:03 +0000</creation_ts>
          <short_desc>[FO31] Can we assume the schema for the XML namespace is implicitly imported?</short_desc>
          <delta_ts>2016-12-16 19:55:35 +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>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>andrew_coleman</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>128022</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-02 09:54:03 +0000</bug_when>
    <thetext>The examples in 14.5.3 for the fn:idref() function only work if the schema for the XML namespace is implicitly imported. The test case does lax validation on a fragment of XML that uses an xml:id attribute, which will cause the corresponding node to have the is-id property if and only if the attribute declaration for xml:id is present in the in-scope schema definitions.

In bug #28174 we considered whether the schema for the fn namespace should be automatically imported. It was a somewhat convoluted thread. The conclusion was that (a) it should not be automatically imported, but (b) processors should be required to recognize the namespace in an &quot;import schema&quot; declaration, and an import schema for this namespace should therefore be guaranteed to succeed (and to import the schema that we specify, not any other) whether or not a schema-location is provided. This text indeed appears under &quot;import schema&quot; in XQuery and under xsl:import-schema in XSLT.

(see also bug 29974)

I think we should probably do the same for the XML namespace. We should make it clear that (a) the XML namespace is not (necessarily) implicitly imported, but that an &quot;import schema&quot; specifying the right URI is guaranteed to import the correct schema regardless of any location hints.

Meanwhile the examples in F+O 14.5.3, and therefore the test cases in app-spec-examples (specifically fo-test-fn-idref-001 and -002) make an unwarranted assumption that the XML namespace is imported, and we should fix the examples / test cases to ensure this. This isn&apos;t easy within the current mechanisms since the code needed is then XQuery or XSLT dependent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128155</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2016-11-11 14:00:56 +0000</bug_when>
    <thetext>The WG discussed this and decided:

1. Make sure that XDM correctly assigns xml:id in all cases, including lax
2. Add to the rules for XQ/XT validation: &quot;If the instance being validated contains an xml:id attribute, both lax and strict validation cause this attribute to be subjected to [xml:id] processing: that is, the attribute is checked for uniqueness, and is typed as xs:ID, and the containing element is therefore eligible as a target for the id() function.&quot;

Action A-660-02: Jonathan to add resolution of Bug 29975 to XQuery / XPath.
Action A-660-03: Mike to add resolution of Bug 29975 to XSLT.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>