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>


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

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 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC