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

Re: How Do I Force Instances To Use Specific Derived Types?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 12 Sep 2002 10:21:44 +0100
To: Joe.Misner@ivans.com
Cc: xmlschema-dev@w3.org
Message-ID: <f5bwupry34n.fsf@cogsci.ed.ac.uk>

You have described with admirable clarity the use case which motivates
the presence of redefine in the language.  If you do the following,
with the noted changes, _and_ use _your_ schema to validate incoming
documents, not whatever schema they happen to point to, you'll get
what you want.

Joe.Misner@ivans.com writes:

<xsd:schema xmlns:OrgA="www.OrgA.org/BigSchema"
                targetNamespace="www.CompanyA.com/BigSchema">
                             <!--^^^^^^^^^^^^^^^^^^^^^^^-->
 <xsd:redefine schemaLocation="www.OrgA.org/Bigschema/schema.xsd"/>
 <!--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-->
  <xsd:complexType name="TypeA">
                    <!--^^^^^^^-->
         <xsd:complexContent>
                 <xsd:restriction base="OrgA:TypeA">
                         <!-- Specific restrictions not relevant. -->
                 </xsd:restriction>
         </xsd:complexContent>
  </xsd:complexType>
 </xsd:redefine>

Hope this helps,

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Thursday, 12 September 2002 05:21:47 GMT

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