[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
xml schema styles

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

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.