Re: Inheritance in XML (was Re: Problems parsing XML)
Martin Bryan (mtbryan@sgml.u-net.com)
Sat, 18 Apr 1998 08:49:07 +0100
Michael Kay wrote:
>I know some people will disagree, but the way I use XML, a DTD is a
>schema, an element definition in a DTD is a class, a document is a
>database, and an element within a document is an instance of a class.
>What is missing is that we can't define one class (element type) as a
>subtype of another.
In SGML you can use exclusions to make an element a true subclass of
another:
<!ELEMENT X (%Y-contents;) -(a|b|c)>
providing a, b and c are optional components within the model for Y.
Unfortunately XML dropped this useful option from the set of SGML facilities
it in inherited
Martin Bryan