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

Re: Invalid per cvc-complex-type.1.3: undeclared attribute {None}:use

From: Edwin Dankert <edankert@cladonia.com>
Date: Sun, 26 Oct 2003 20:33:40 -0000
To: xmlschema-dev@w3.org
Message-ID: <bnhb3p$q6t$1@sea.gmane.org>

Hello Jeni,

Thanks for that.

I think it's all clear now:
- Elements/attributes/types in the schema are declared in the
  targetNamespace or in no namespace if no targetNamespace is defined.

- References to an element/attribute/type in the schema are resolved
  using the default namespace declaration or if the 'ref' value has a
  prefix using the namespace declared for the prefix.

So the following reference is correct, since the default namespace of the
'ref element' is empty:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:test">
  <xs:element name="A">

        <xs:element xmlns="" ref="B"/>

  <xs:element name="B"/>

However the following cannot be correct, since the reference would point to
an element defined in the XML Schema namespace and this 'B' element has not
been defined in any namespace:

<schema xmlns="http://www.w3.org/2001/XMLSchema">
  <element name="A">
        <element ref="B"/>
  <element name="B"/>

Note: XSV (2.5-2 of 2003/07/09 13:08:04) does not report an error for the
version above.

Received on Sunday, 26 October 2003 15:34:04 UTC

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