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

Referencing declarations

From: Boris Kolpackov <boris@codesynthesis.com>
Date: Thu, 15 May 2008 12:49:41 +0200
To: xmlschema-dev@w3.org
Message-ID: <20080515104941.GA21335@karelia>
Referencing declarations

Hi,

Consider the following two schema files:

<!-- includee.xsd -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="el" type="type"/>
</xsd:schema>

<!-- includer.xsd -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="test" targetNamespace="test">
  <xsd:include schemaLocation="includee.xsd"/>

  <xsd:simpleType name="type">
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>
</xsd:schema>

Here includer.xsd chameleon-includes includee.xsd which in turn
references a type from the including schema. It seems that this
should be legal however I couldn't locate the relevant part in
the spec (4.2.1 appears to be covering this case).

I am wondering of an implementation that conceptually transforms
includee.xsd (for the purpose of being included in includer.xsd)
into the following schema would do the right thing:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="test"
            xmlns="test">
  <xsd:element name="el" type="type"/>
</xsd:schema>


Thanks,
Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
Received on Thursday, 15 May 2008 11:13:55 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.