W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2007

Re: How to specify "coupled" attibutes

From: Philippe Poulard <philippe.poulard@sophia.inria.fr>
Date: Fri, 12 Oct 2007 09:43:52 +0200
Message-ID: <470F25B8.2020005@sophia.inria.fr>
To: noah_mendelsohn@us.ibm.com
CC: wayne liu <waynix@gmail.com>, George Cristian Bina <george@oxygenxml.com>, xmlschema-dev@w3.org

noah_mendelsohn@us.ibm.com a écrit :
>> You cannot do that in XML Schema (at least not in the current version, 
> 1.0).
> Yes, but you will be able to enforce that check using the assertion 
> mechanism that's planned for Schema 1.1. 

I wonder if this assertion mechanism will enforce the content model to 
be those expected, or if it is a mechanism that works like schematron, 
that is to say *after* applying the content model ; an editor would 
propose to its user some candidate elements for insertion and then 
refuse the one selected thanks to the assertion ; not fair

I'm convinced that it's much more efficient to act on the content model 
directly ; to quote Michael Kay, "there will always be rules that can't 
be expressed in a grammar-based schema language", so why not *mixing* 
declarative languages such as schema languages with imperative 
constructs ? your content model would adapt itself dynamically to the 
data to validate

Here is a detailed explanation with an example :

Some other examples (that you can run if you donwload the engine) :

Notice that mixing a declarative language with imperative constructs is 
a concept already adopted by your peers : if/then/else and for-each 
structures are part of XPath2 ; the same in W3C XML Schema would enhance 
dramatically its expressiveness power


              (. .)
|      Philippe Poulard       |
        Have the RefleX !
Received on Friday, 12 October 2007 07:44:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:44 UTC