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

Re: DOM Level 3, more or less flexible than AS?


Re:  DOM Level 3
At 3:58 PM +0200 10/24/02, Eric van der Vlist wrote:


>If we go back to DOM AS, the idea (as I understand it) was to completely
>hide the schema system and rely on a query/request mechanism (the
>application would just have asked to the AS if such and such update
>could be done).

No, that's not really how abstract schemas worked (or at least it's 
not all they did.) They had a very detailed class hierarchy 
describing, for example, the allowable content model of an element. 
For example, here's what the ASElementDecl interface looked like in 
IDL:

interface ASElementDecl : ASObject {
   readonly attribute ASDataType      type;
   readonly attribute unsigned short  contentType;
   readonly attribute boolean         strictMixedContent;
   readonly attribute ASContentModel  contentModel;
   readonly attribute boolean         isPCDataOnly;
   readonly attribute ASNamedObjectMap attributeDecls;
   ASAttributeDecl    getAttributeDecl(in DOMString name,
                                       in DOMString targetNamespace);
};

This also failed to fit Schematron. And this has all gone away now.

>IMO, this blackbox approach is the most generic API we can imagine and
>it could virtually cope with any kind of "schema" system, including
>Relax NG, Schematron or even one's own application.

That's what DOM Level 3 validation is about. It's just been split off 
into a more modular spec that was announced a couple of months ago. 
See http://www.w3.org/TR/DOM-Level-3-Val/validation.html

>By contrast, accepting the idea that an element or an attribute must
>have a "type" seems to be a step backward.

They are not required to. They are simply allowed to. Many elements 
and attributes will have null types. (The exact representation of an 
unknown type is still being discussed, but the working group clearly 
understands that they can't assign a type to everything.)

>Relax NG doesn't impose this (and doesn't guarantee to report type
>information consitently in all the cases) and Schematron has no
>"built-in" notion of type either.
>
>Furthermore, I don't see how you can implement rules like Schematron
>does so well with a type and a URI.

Typing is about annotation. Validation is about checking conformance 
to a schema. They are often confused, but they are not the same 
thing. I think the new batch of specs gets this a lot more right than 
the old ones did.  It's far more modular, and allows developers to 
pick and choose what they need without locking them in to any one 
schema language.

>I think that we are moving from a concept which could have been amended
>to support any type of schema and constraint to a concept which at the
>end of the day might be more complex and is narrow minded and very
>specific to the DTDs and W3C XML Schema approaches!

I suspect if you look more closely at the family of DOM 3 specs, 
you'll find that what you like is still there, and that a lot of 
things you'd find very ugly and obnoxious have gone away.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@m... | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

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.