W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2000

Re: namespaces and schemaLocation

From: <Noah_Mendelsohn@lotus.com>
Date: Tue, 15 Aug 2000 10:10:17 -0400
To: lcastro@cookwood.com
Cc: www-xml-schema-comments@w3.org
Message-ID: <OFC0C459F3.35837B9F-ON8525693C.004C23AF@lotus.com>

Liz Castro writes:

>> How can you define a namespace with a
>> schema if those local elements
>> and attributes are not associated with
>> the target namespace?

I think the answer is right there in your question.  With or without
schemas, the vast majority of namespace-based vocabularies use unqualified
attributes :

     <myns:e attr1="..."  xmlns:myns="someuri"/>

The namespaces recommendation facilitiates such behavior by declining to
apply namespace defaults to attributes [1]:

     <!-- same element as above, attr still unqualified -->
     <e attr1="..."   xmlns="someuri"/>

The default behavior of the schema specification is to extend that
convention to locally scoped elements:

     <myns:outer attr="..." xmlns:myns="someuri">

both attr and inner are conceptually associated with the qualified element
myns:outer;  in other words, they are locally scoped.

I can tell you that the schema workgroup devoted literally months of
concentrated effort to the issues underlying the design for local element
qualification that you find in our specification.  That does not
necessarily mean that everyone in the workgroup is equally happy with our
final decision, but it does indicate that there are many, many subtleties
and that great care was taken in their consideration.

[1] http://www.w3.org/TR/REC-xml-names/#defaulting

Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
Received on Tuesday, 15 August 2000 10:39:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC