W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2004

Re: advice on xmlns requested

From: <noah_mendelsohn@us.ibm.com>
Date: Mon, 26 Jul 2004 16:26:03 -0400
To: Ken_Gross@Countrywide.Com
Cc: xmlschema-dev@w3.org
Message-ID: <OFA8C06BC1.43276ED2-ON85256EDD.0070877D@lotus.com>

Ken Gross asks:

> Is the following schema header valid?  If not, what
> would make it valid?
> 
> <xsd:schema targetNamespace="WebServiceModel" 
> elementFormDefault="unqualified" 
> attributeFormDefault="qualified" 
> xmlns:AILoan="AILoan" 
> xmlns:WebServiceClass="WebServiceClass" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:WebServiceModel="WebServiceModel"> 
> 
> Thanks 
> 
> Ken

At least from a quick skim, it looks OK to me, though your choice of 
namespace is at best atypical.  According to the Namespaces in XML 
Recommendation [1], a namespace name is what's called a URI Reference (see 
RFC 2396, [2] being the version of RFC 2396 that was current at the time 
namespaces came out.)

Informally, a URI reference is what you can type into the address bar of 
your web browser.  As you probably know, a fully qualified (absolute) URI 
reference starts with a scheme such as http:, e.g.:

        http://example.org/NoahsNamespace

As the RFC 2396 tells us, and as you may know from authoring web pages, a 
simple token such as "WebServiceModel" is a relative form which is 
properly interpreted in the context of some absolute URI context (called a 
Base URI, see e.g.  [3]).  The primary reasons that namespace names are 
URIs is that absolute URIs provide a means of letting users all over the 
world generate names with low likelihood of collision.  You lose that when 
you use a simple token such as WebServiceModel.  The other reason 
namespace names are URIs is that Namespaces become integrated into the Web 
itself;  you may (but you need not) provide some useful information such 
as an RDDL [4] document or a schema for retrieval at that URI.  You should 
in any case either own or have the permission of the owner of the DNS name 
of any URIs that you use as namespace names:  it would be very bad form, 
for example, for you to deploy a namespace name such as the one above 
without the permission of the owners of example.org (which is in fact a 
registered specifically for use with examples such as this...nobody 
actually actually deploys anything there except as a warning [5]).

Bottom line: you should use absolute URIs as namespace names.  This, by 
the way, has nothing much to do with XML schema.  It's what you need to do 
regardless of whether you write a schema for your namespace.  Otherwise, 
your schema element looks OK to me.  Maybe I'm missing something.

Noah

[1] http://www.w3.org/TR/REC-xml-names/#ns-decl
[2] http://www.ietf.org/rfc/rfc2396.txt
[3] http://www.w3.org/TR/xmlbase/
[4] http://www.rddl.org/
[5] http://www.example.org/


--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------
Received on Monday, 26 July 2004 16:32:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:10 UTC