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)

"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

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.

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.

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

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>

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>

The W3C XML Schema working group has widely used this construct in their
vocabulary and I find it surprising to see that violations such as:

<element name="foo" ref="foo" ...

cannot be captured by the schema for W3C XML Schema!


> Len
> http://www.mp3.com/LenBullard
> Ekam sat.h, Vipraah bahudhaa vadanti.
> Daamyata. Datta. Dayadhvam.h
See you in Hong Kong for www10:
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org           http://examplotron.org