W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

namespaces and includes

From: Ross Thompson <rthompson@contivo.com>
Date: Mon, 11 Mar 2002 08:55:51 -0800
Message-ID: <15500.57751.230281.661041@booga.contivo.com>
To: xmlschema-dev@w3.org

It seems to me like the following should be legal:

schemaA:

  <xs:schema targetNamespace="http://bob.com/bob/"
          xmlns:bob="http://bob.com/bob/"
          xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <include schemaLocation="schemaB"/>  

  </xs:schema>
  
schemaB:

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

    <xs:element name="fred" type="fredType"/>

    <xs:simpleType name="fredType">
      <xs:restriction base="xs:string">
    </xs:simpleType>

  </xs:schema>

But my reading of the spec says it's not, because the declaration of
fredType is in the namespace http://bob.com/bob/, and the reference is
to the unnamed namespace.  My reading makes includes far less useful,
however, because I can't do the obvious thing of writing generic
content that can be incorporated into several schemata.

Can someone point me to the place in the spec where it says which
namespace unqualified references in an included schema refer to?

Thanks,
- Roß

---
In our country we have those three unspeakably precious things: freedom
of speech, freedom of conscience, and the prudence never to practice
either. 				-- Mark Twain
Received on Monday, 11 March 2002 13:05:37 GMT

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