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 29975 - [FO31] Can we assume the schema for the XML namespace is implicitly imported?
Summary: [FO31] Can we assume the schema for the XML namespace is implicitly imported?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-02 09:54 UTC by Michael Kay
Modified: 2016-12-16 19:55 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2016-11-02 09:54:03 UTC
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 "import schema" 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 "import schema" 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 "import schema" 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't easy within the current mechanisms since the code needed is then XQuery or XSLT dependent.
Comment 1 Andrew Coleman 2016-11-11 14:00:56 UTC
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: "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."

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.