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 4363 - Are references to e.g. xsi:schema-location allowed in schema docs
Summary: Are references to e.g. xsi:schema-location allowed in schema docs
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL: http://lists.w3.org/Archives/Public/x...
Whiteboard:
Keywords: resolved
Depends on: 1890
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-02 16:20 UTC by Henry S. Thompson
Modified: 2007-06-18 14:15 UTC (History)
1 user (show)

See Also:


Attachments

Description Henry S. Thompson 2007-03-02 16:20:35 UTC
The referenced thread suggests there are a number of uncertainties in the spec. wrt what you can and can't do with the built-in attributes in the XMLSchema-instance namespace:
 a) Can you reference them?  Do you need to import the namespace to do so?
 b) Can you give them defaults, in an attribute use?
 c) If (b) , then what does it mean when you do?
Comment 1 Mary Holstege 2007-03-29 13:25:43 UTC
The WG discussed this 2007-03-28.  Conclusions:

xsi:* are built-in, and there is no rule in the specification that forbids
referring to them.

As shown, schema document is not valid because it lacks an import.

The specification is not ambiguous about this.

However, note that the rules in Validation Rule: Element Locally Valid 
(Complex Type) mean that the attribute use settings such as default values
will not have any effect because they are not consulted for the 
attributes in the http://www.w3.org/2001/XMLSchema-instance namespace.
Comment 2 Henry S. Thompson 2007-04-02 08:49:32 UTC
  "As shown, schema document is not valid because it lacks an import.

  "The specification is not ambiguous about this."

I don't agree.  The spec says, wrt this namespace, "All schema processors have appropriate attribute declarations for these attributes built in".  We certainly do _not_ require an import for the other namespace which is built-in, namely the Schema namespace itself.  The spec. as written actually _does_ appear to require an import for http://www.w3.org/2001/XMLSchema, in that clause 4.2 of "Schema Representation Constraint: QName resolution (Schema Document)" does not explicitly provide for any exceptions.

So until we clarify that _only_ the Schema namespace itself is special in this regard, I think the spec. _is_ ambiguous, and should be fixed.
Comment 3 Sandy Gao 2007-04-02 13:42:50 UTC
We have a long standing bug 1890 opened against 1.0, about QName resolution and schema namespace. Our tentative resolution is that 1.0 spec (and 1.1) is in error and we should clarify, in "QName Resolution (Schema Document)", that schema built-in components can be referenced without an import.

Resolution to this bug will then depend on 1890. If 1890 says "references to schema built-in components don't need import", then that also applies to references to xsi: attributes. If 1890 says "references to components in the schema namespce don't need import", then xsi: needs an import.
Comment 4 Sandy Gao 2007-04-25 16:21:45 UTC
> c) If (b) , then what does it mean when you do?

As mentioned in comment #1, defaults for xsi: attributes don't change how validation is performaned. But in 3.4.5 (where attribute defaulting happens), xsi: attributes will be added to the PSVI (if they have defaults and don't appear in the instance). Is this the intended behavior?
Comment 5 C. M. Sperberg-McQueen 2007-05-25 22:44:27 UTC
On the WG call of 11 May 2007, the WG agreed in principle to resolve
this issue by making the XSI and XSD namespaces 'magic' and allowing
namespaces in those namespaces to be used without imports.
(http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2007May/att-0030/2007-05-11telcon.html)
(member-only link).

Accordingly, I'm changing the status keyword from needsAgreement
to needsDrafting.
Comment 6 Sandy Gao 2007-06-04 14:50:37 UTC
Minor correction to comment #5. On 11 May 2007, we accepted a wording proposal on bug 1890, which is now marked as "decided".

The question raised in comment #4 is still outstanding. Marking this issue "needs agreement".
Comment 7 Sandy Gao 2007-06-08 16:23:29 UTC
On 2007-06-08, the WG decided to adopt a proposal that resolves comment #4 by clarifying that default/fixed values specified on xsi: attributes are not applied and/or checked.
Comment 8 C. M. Sperberg-McQueen 2007-06-18 14:15:58 UTC
The proposal adopted by the Working Group has now been integrated into
the status quo documents on the server; accordingly, I'm changing the
status to 'RESOLVED'.