W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2005

Schema styles...

From: Gary Maltzen <xml-schema@mwwm.net>
Date: Thu, 08 Sep 2005 02:19:53 -0500
Message-ID: <431FE619.3050500@mwwm.net>
To: XMLSchema-Dev <xmlschema-dev@w3.org>

When defining a Schema it seems to me that most of the context is in the 
XML-Schema namespace, so I keep wondering why there seems to be a 
preference for qualifying the XML-Schema namespace rather than the 
defined namespace, i.e.

<xs:schema xmlns:xs="http://www.w3.org/2001/XML-Schema" 
xmlns="urn:MyContext" targetNamespace="urn:MyContext">
  <xs:simpleType name="MyType">
    <xs:annotation>
      ...
    </xs:annotation>
    ...
  </xs:simpleType>
  <xs:element name=""myType" type="MyType">
    <xs:annotation>
      ...
    </xs:annotation>
  </xs:element>
</xs:schema>

rather than the (to me, at least) cleaner appearing

<schema xmlns="http://www.w3.org/2001/XML-Schema" 
xmlns:my="urn:MyContext" targetNamespace="urn:MyContext">
  <simpleType name="MyType">
    <annotation>
      ...
    </annotation>
    ...
  </simpleType>
  <element name="myType" type="my:MyType">
    <annotation>
      ...
    </annotation>
  </element>
</schema>

Is there some significant difference in the result?
Received on Thursday, 8 September 2005 07:20:13 GMT

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