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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Subtyping in XML

[ Lists Home | Date Index | Thread Index ]

Jeff Lowery <jlowery@scenicsoft.com> writes:

> > The specific argument is that XML Schema should not allow 
> > derivation by
> > extension by default. And people should be very careful if 
> > they choose to
> > do it explicitly.
> I can agree with that.  It  should at least be a configurable option in any
> XML Schema editor.
> > The general argument is that this kind of confusion arises because XML
> > Schema is trying to do two jobs at once. First it is trying 
> > to constrain
> > the *syntax* of a class of XML documents. In this it is like 
> > DTDs, RELAX,
> > etc. The second thing is to try to define a mapping into an object
> > oriented model with subtyping. In this it is unique. As they 
> > say: "It is
> > both good and original. But that which is good is not 
> > original and that
> > which is original is not good." ;)
> That's a bit of a strawman, IMHO.  It may have been the intent of the WG to
> produce OO in XML

Not produce, but introduce, and I think you're both a little
off-target wrt why type definition by restriction and extension are in
the language.  They're there in large part because the WG had a
requirement to improve the managability of the process of syntactic
constraint, by introducing 'inheritance' (read OO-design features)
into the constraint language.  Think of C --> C++ as a parallel, in so
far as C++ took a number of OO design patterns generally acknowledged
to be useful for maintaining large programs over time, which C
developers had to implement using text-substitution-macros
(i.e. #include), and moved them into the language.  In introducing the
tag-type distinction, derivation by restriction and extension, named
element and attribute groups and substitution groups, the WG was very
consciously trying to do the same thing, looking at existing 'best
practise' wrt the use of parameter entities in large DTDs.

You may or may not think we got it right, but that was the primary
motivation.  The possibility of a better impedence match between
documents and application data was a collateral benefit (or not, _ad

  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]


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

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