[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Remember to RELAX (was RE: Are there still a lot of peopleusingDTD)

  • From: Rick JELLIFFE <ricko@g...>
  • To: xml-dev@l...
  • Date: Wed, 02 Aug 2000 05:05:07 +0800

remember to relax
Bob Kline wrote:
 
> I've assumed (from a distance) based on statements that use phrases like
> "upward compatibility" and "easy transition" that the functionality
> provided by RELAX was a subset of that provided by XML Schema.  However,
> I haven't found anything in the latter comparable to the attribute-
> sensitive content models supported by RELAX.  Is this because XML Schema
> doesn't have such a feature, or just because it's harder to find things
> in the more densely-worded Schema documentation (or perhaps just because
> I'm not reading carefully enough)?
 
Yes, XML Schemas has (almost) no "co-occurence" constraints. Type is
determined by 
 * element name (in context of its parent's type) or
 * xsi:type  attribute where allowed

So attributes cannot be used to specify attributes related to typing.
(Well, they can be used, just that XML Schemas cannot make any use of
that information.)  They cannot override a facet or set a type. 
(xsi:null="yes" does not change the type of an element, or set a value
or facet. It changes something else: a property?)

RELAX (and DCD) provide something much better: they allow co-occurence
constraints. I think these are limited to just element names and
attributes along the ancestor axis, so that stream-processing can be
done.  Schematron allows constraints from any axis, including poking
around other documents. Dave Ragget's Assertion Grammars started the
idea AFAIK.

I have mentioned this before, and I have harped on about it frequently
and unattractively on the XML Schema mail-lists at W3C.  But no-one from
the public raised it as a Last Call issue, so it seems that people don't
want it. I think all the schema languages that fed into XML Schemas just
keyed the type from element names (perhaps in context of parent element
name) and no-one complained about them.  I cannot understand why there
is not more fuss about it:  it gets rid of what I consider the prime use
(apart from ID/IDREF) of attributes--to provide subclassing
information.  DTDS had it for datatyping: you could constrain an element
to be certain notations and select which notation was used. However, XML
Schemas supports standard datatypes not arbitrary user-defined ones, so
it does  not support things like
  <date type="US">12-31-2000</date>

An alternative way to look at it, I suppose, is that people are happy to
use schemas to specify the static constraints on a document's structure
and then use Schematron (or home-made equivs) to specify the dynamic,
attribute-provided constraints.  That is the model I am reluctantly
expecting for 2001.  If you want
to use attributes for subclassing, and if there is another Last Call
draft of XML Schemas (not at all guaranteed: people and their employers
are pretty tired), please send comments to the appropriate W3C mailling
list.
 
Rick Jelliffe

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.