John Cowan wrote:
> After mulling it for several days, I think this is the Right Thing.
> Add an #IMPLIED "ns" attribute to ElementDecl and AttDef elements
> whose value is an URI. XSchema validation can then proceed with
> respect to the actual URIs, and disregarding the actual prefixes
> used in particular documents. This gives XSchemas a leg-up on DTDs,
> which are bound to specific prefixes in the name of SGML
> (and XML 1.0) compatibility.
Toby Speight wrote:
> This sounds good - do we want to include a "suggested prefix" (to
> facilitate conversion to DTD format when possible)? Or perhaps use
> the fully-prefixed form in the XSchema, and ignore it for direct
> XSchema processing?
Just to be clear, the proposal is as follows:
1) The Namespace element goes away.
2) We add the following attributes:
<!ATTLIST XSchema
...
ns CDATA #IMPLIED
prefix NMTOKEN #IMPLIED>
<!ATTLIST ElementDecl
...
ns CDATA #IMPLIED
prefix NMTOKEN #IMPLIED>
<!ATTLIST AttList
...
ns CDATA #IMPLIED
prefix NMTOKEN #IMPLIED>
The ns attribute states which namespace the element/attribute being declared
belongs to. Thus, when validating an instance file, the validator resolves the
prefix in the instance file and checks that the element/attribute matches the
definition for that element/attribute in the namespace identified by the ns
attribute.
The prefix attribute is used only by the XSchema-to-DTD converter; if it is
missing, the converter either makes up a prefix or does not use a prefix. (Note
that we cannot set the ns attribute during DTD-to-XSchema conversion because we
do not know what namespace applies to which prefix; this information is
specified in the instance, not the DTD. For people who agreed to be unabusive
about their prefix->namespace mappings, we could define a PI for use in the
DTD.)
If this is the case, I am in complete agreement.
-- Ron Bourret