OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Is it possible to cascade schemas?

[ Lists Home | Date Index | Thread Index ]
  • From: jdg <jdg@nwk.cl.nec.co.jp>
  • To: xml-dev@lists.xml.org
  • Date: Mon, 17 Jul 2000 15:06:04 +0900

For data modeling purpose, I want to cascade 2 schemas as described in the following example:
 1) a schema that describes a object class structure: here a mib is componed of classes that include its name and its position in an inheritance tree.
<?xml version='1.0'?>
<!-- schema_schema_test_2.xsd -->
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
<AttributeType name="name" dt:type="string"/>
<AttributeType name="derivedFrom" dt:type="string"/>  
<ElementType name="class">
     <attribute type="name"/>
     <attribute type="derivedFrom"/>
<ElementType name="mib">
     <element type="class"/>

2) a schema that uses the class structure described in the prior schema and define the class "equipment" that derives from the top class and contains 1 attribute called "userLabel":
<?xml version='1.0'?>
<!-- schema_test_2.xsd -->
<mib xmlns="x-schema:schema_schema_test_2.xsd"
<dt:AttributeType name="UserLabel" type="string"/>
<moc name="equipment" derivedFrom="top">
     <dt:attribute type="UserLabel" name="userLabel"/> 
<dt:ElementType name="model">
     <dt:element type="equipment"/>
3) then the instance document has the following aspect: the model contains 2 equipment class called Fr_It 2_1 and Fr_Br 3_0
<?xml version='1.0'?>
<!-- data_test_2.xml -->
<model xmlns="x-schema:schema_test_2.xsd">
<equipment userlabel="router Fr_It 2_1"/>
<equipment userlabel="router Fr_Br 3_0"/>
? This example doesn t work: the second schema is valid against the first schema, but there is an error while checking the well-formness of the instance document. I am a little bit confused since a simpler example with only one schema works well. Am I missing something?


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS