XML Schema equivClass.
michael at research.canon.com.au
Thu Feb 3 00:52:21 GMT 2000
Thank you for the replies to my first set of questions. Which have, of
course, led to some more questions. The main point I would like
the statement in a reply [ht].
> The two hierarchies (complex type and
> equivalence class) go together.
Normally in object oriented systems if a class (or type) B is derived
class A then an instance of B can substitute an instance of A purely on
basis of the defined inheritance. That is, inheritance implies
So if I have a schema that contains the following:
<element name="A" type="Atype"/>
<element name="B" type="Btype"/>
<type name="Btype" source="Atype" derivedBy="extension">
<element name="C" >
I now expect that it is okay to declare in the document instance:
<B> B stuff in here </B>
This should be okay as Btype extends Atype and the content model was
expecting A (with Atype) but got B (with Btype). The WD however, states
it is necessary in the schema to declare equivClass to say B is a
<element name="B" type="Btype" equivClass="A" />
If it is necessary to declare equivClass then what exactly is
role other than to facilitate the subclassing? The WD states that
elements must have types derived from the exemplar type so this use of
extended/restricted types may as well incorporate the subclassing.
Help on this issue would be much appreciated.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions and unsubscriptions
are now ***CLOSED*** in preparation for list transfer to OASIS.
More information about the Xml-dev