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

Mixing no-namespace and namespace XML Schemas

From: Oliver M. Haynold <oliver60201@hotmail.com>
Date: Sat, 03 Jan 2004 15:14:41 -0600
To: xmlschema-dev@w3.org
Message-ID: <pan.2004.>


I have an application where I want to elements that don't have a namespace
(from the TEI) with elements that are associated with a namespace (some
own extensions that are orthogonal to the TEI and could also be used with
XHTML etc.). Now I would like to use XML Schemata to express these
vocabularies, the immediate reason being that I would like to edit my
documents with Syntext Serna. In order to make these schemata I have
written my own little DTD to XSD converter, which I plan to release under
the GPL as soon as the schemata it generates actually seem to work like
the should.

For the namespaceless TEI schema, I declare the schema like this:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  <!-- Actual element definitions go here -->

So far so good. Now, in order to use this in quotable.xsd schema I declare

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

This should, if I understood the XML Schema specification correctly, mean
that all elements I reference in the second file (quotable.xsd) without a
namespace prefix are to be taken from the tei.xsd file.

Alas, if I try to validate a document with these schemata with XSV (or to
use them in Serna which uses XSV internally), it seems that XSV doesn't
understand the import statement for the empty-namespace. The XSV output
reports that XSV found the import statement, but, for some reason chose
not to read it:

    outcome="skipped" source="import"/>

Little wonder then, that it generates hundreds of errors because it
doesn't know about the elements declared there.

Did I misunderstand the Schema specification entirely, or is this really a
bug/missing feature of XSV? The following snippet in XSV:

  ne.newAttr('outcome','skipped')   # i.e. we chose to only pursue
                                    # one file per import

that generates the "skipped" message would seem to indicate that XSV
thinks that it already did import the Schema for the non-namespace, but
I don't know whether it is my (ab?)use of XML Schema or a problem with XSV
that causes this problem.

Regards from the Black Forest,

Received on Saturday, 3 January 2004 16:43:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:04 UTC