- From: cedric thienot <cedric.thienot@lip6.fr>
- Date: Wed, 07 Jun 2000 17:30:20 +0200
- To: www-xml-schema-comments@w3.org
Dear all, We would like to make two comments to XML schema. 1. use of XPath and the equivalence Class and inheritance mechanism: Imagine the following schema: <element name="e1" type="t1" equivClass="e2"/> <element name="e2" type="t1"/> <complexType name="t1"> <attribute="a1" type="integer"/> </complexType> <element name="e3"> <complexType> <element ref="e1"/> </complexType> <key name="k1"> <selector>e1</selector> <field>@a1</field> </key> </element> Does this schema validate the following description: <e3> <e1 a1="2"/> </e3> <e3> <e2 a1="2"/> </e3> In other word, how XPath (in the selector tag) handles the equivalence class mechanism ? 2) reusability and evolution of type when derived by restriction. If you define a type: <complexType name="t1"> <element name="e1" type="integer" minOccur="0" maxOccur="4"/> </complexType> and someone else reuses this type by extending by restriction <complexType name="t12" derivedBy="restriction"> <element name="e1" type="integer minOccur="0" maxOccur="3"/> </complexType> Therefore, You can not change the type t1 without affecting the type t2: You are not allowed to make your type t1 evolve by adding something. otherwise the type t12 would not be correct anymore (if you derived by restriction, you need to rewrite the entire content model of the type). In a development environment, the need of improving schemas will certainly occurs. It should affect as few as possible other dependent schemas. Two solutions are proposed in XML schema: 1) either you block the inheritance mechanism. none type can derived of t1 (the definition of t2 is not allowed). Therefore, your schema is not extensible. 2) You redefine every subtype of t1. It doesn't make sense. One solution (not defined in XML schema) would be to identify restricted elements by using an XPath expression instead of a full redefinition This constraint is quite important, and we would like to have your comments. Cedric, Claude ----------------------------------------------- Cedric Thienot ( Cedric.Thienot@lip6.fr ) __ /\_\ Multimedia indexing Team \/_/ Bureau 1917 __ Laboratoire LIP6 - ASIM /\_\ Universite Pierre et Marie Curie - Paris 6 \/_/ 8 rue du capitaine Scott __ 75015 Parris - France /\_\ \/_/ Tel: +33 (0)1 44 27 60 18 -----------------------------------------------
Received on Wednesday, 7 June 2000 11:34:14 UTC