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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can XML Schemas Support Document Systems (WAS RE: ZDNet Schemaarticle,and hiding complexity within user-friendly products)

Eric van der Vlist <vdv@dyomedea.com> writes:

> "Bullard, Claude L (Len)" wrote:
> > 
> > On the other hand, I am interested in the assertions
> > that XML Schema cannot support document-centric applications.
> > It appears to me that it can if the right set of features
> > are used, but maybe I am missing something more vital than
> > "it's hard to understand".
> > 
> > Can anyone summarize the position that it can't support
> > these systems?
> I wouldn't say that W3C XML Schema cannot support document centric
> applications, but rather that it's not a good fit since its features are
> biased toward data applications.
> The obvious proof that W3C XML Schema can support document centric
> applications are the schemas published for XHTML or DocBook.
> W3C XML Schema has sacrificed flexibility (a quality useful for document
> centric applications often authored by a wide range of tools including
> manual edition that can be seen as a defect by data application) to put
> the emphasis on datatypes (an absolute requirement for data
> applications).

I contest this strongly.  I wrote the first HTML schema (never
released) and it was _much_ cleaner than the DTD, precisely _because_
of designed-in flexibility, particularly wrt OO design facilities such 
as the type hierarchy and substitution groups.

> This is best seen in the extremist way W3C XML Schema is forbidding any
> non determinism just to insure that the datatypes in the PSVI are those
> expected by the schema authors.

Which takes away the flexibility which document DTD designers have
always had -- not!  You seem to be forgetting/ignoring the fact that
neither XML nor SGML allow ND content models.  XML Schema _increases_
flexibility compared to DTDs, e.g. by allowing content models for
mixed content, by allowing datatypes for element content, by allowing
element content to be IDs, by giving you scoped keys (Now _there's_ a
good example -- the 'document' people on the WG worked hard to make
sure that part of the design was there), by providing wildcards.

> For example, you can't define a simple and flexible vocabulary where a
> document would have a title, an optional description and any number of
> paragraphs without imposing a relative order to the different elements.

And in XML DTDs you can do this?  Sure, we didn't give you everything,
but we gave you much more than you had before.

> You can't either define that an element has different types with the
> same name at the same "position" in a document.

In SGML and XML you can't give an element with different types _at
all_ (modulo inclusion/exclusion exceptions in SGML)!

> One of the examples I am often using in my trainings and papers is a
> vocabulary where you can either define an element "inline":
> <character id="character_Peppermint-Patty">
>  <name>Peppermint Patty</name>
>  <since>Aug. 22, 1966</since>
>  <qualification>bold, brash and tomboyish</qualification>
> </character>
> or by reference:
> <character ref="character_Peppermint-Patty"/>
> W3C XML Schema cannot capture the fact that the element "character" can
> be either "character definition" or "character reference" and you have
> to work around by defining a superset of character that accepts both id
> and ref optional attributes and name, since and qualification optional
> elements, meaning that you won't detect incorect elements such as:
> <character ref="character_Peppermint-Patty">
>  <name>Peppermint Patty</name>
>  <since>Aug. 22, 1966</since>
>  <qualification>bold, brash and tomboyish</qualification>
> </character>

And in an XML DTD you express this exactly how?  Come on Eric, this is 
the revolution of rising expectations problem -- you can't say on the
one hand "I want lots of stuff that XML DTDs don't give me" and on the 
other hand "So you gave me a lot of stuff that XML DTDs didn't give me, 
but since you didn't give me everything I will assert what you've done 
is useless".

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, 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/