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

Re: Use of namespaces in an XML Schema

From: <Noah_Mendelsohn@lotus.com>
Date: Mon, 20 Mar 2000 18:15:35 -0500
To: achille@us.ibm.com
Cc: www-xml-schema-comments@w3.org
Message-ID: <OF8EDBF0AC.F39B29D1-ON852568A8.007F4045@lotus.com>
XML schemas does not change the way that namespaces work, except insofar 
as we support QNames as attribute values, both within schema documents, 
and in instance documents to be validated.  Schemas makes no change to the 
way that namespace prefixes are declared.  As always, you can do them all 
at the root of your document if none of them ever change or conflict with 
each other, or you can introduce them selectively on child elements as 
needed.  The namespaces recommendation makes clear that all of these 
constructions are equivalent, and we treat them as such.  Note that, for 
instance documents and schema documents, XML schemas starts with infosets. 
 In general, names in the infoset are already resolved with their URI 
qualification.  So, with the exception of QName attributes (which are not 
currently addressed by the infoset recommendation), most of the work is 
done for us before we ever see a schema or instance document. I hope this 
answers your question.

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







achille@us.ibm.com
Sent by: www-xml-schema-comments-request@w3.org
03/20/00 06:02 PM

 
        To:     www-xml-schema-comments@w3.org
        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        Use of namespaces in an XML Schema


Hi !

In the latest spec, all the examples which show how to create a schema by
assembling components from multiple sources use global  namespace
declarations (namespace declarations that appear at the level of the
<schema> element  information item) . Since the namespace spec allows to
declare namespace in each element information item, I wonder if  a schema
with local scope namespace declarations is still a valid schema (provided
that I add, for each namespace declaration,  the corresponding  import
statement).
Example :

<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <import namespace="http://www.w3.org/questions">
     <xsd:element name="A" type="xsd:string">
     <xsd:element name="B"  xmlns:localprefix="http://www.w3.org/questions"
type="localprefix:typeA">
<xsd:schema>

Thanks,

Achille Fokoue.
Received on Monday, 20 March 2000 18:17:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT