W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Confused about name-space declarations..

From: Ian Stuart <Ian.Stuart@ed.ac.uk>
Date: 05 Oct 2001 08:22:55 +0100
To: XML-Schema-dev <xmlschema-dev@w3.org>
Message-Id: <1002266575.2717.28.camel@lucas.ucs.ed.ac.uk>
Morning folks..

I thought, for a while, that I had the name-space declarations sussed:

You use one of the following formats:

xsi:NoNamespaceSchemaLocation = <URI_of_schema_file>

or

xmlns:MyNameSpaceTag = "<namespace URI>"
xsi:schemaLocation = "<namespace URI> <schema_file>"

or (I found out by accident)

if the schema has the same basename as the instance document *and* is in
the name directory - you don't need a declaration at all

HOWEVER:
Why to these work:

xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"

They make no reference to a file, and the "noNamespaceSchemaLocation"
attribute does not work without the :xsi declaration...

Any guidance/illumination greatfully recieved..

-- 
--==++
Ian Stuart: Edinburgh University Data Library.
I build things: computer programs (with code); or cars (with metal)

 Personal web site: http://lucas.ucs.ed.ac.uk/ 
Received on Friday, 5 October 2001 03:16:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT