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

RE: optional, but at least one required

From: Michael Kay <mike@saxonica.com>
Date: Fri, 12 Oct 2007 15:41:31 +0100
To: "'Pete Cordell'" <petexmldev@tech-know-ware.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <009a01c80cdd$fbf5b9f0$4063a8c0@turtle>
RE: optional

> 
> Our problem with the xpath stuff is that we unmarshal into 
> strongly typed C++ objects. 

Products with that kind of architecture already seem to struggle with many
aspects of XML Schema conformance, for example some of them have great
trouble with mixed content. That suggests to me that if you're aiming for
complete support of XML Schema validation rules, you've got the wrong
architecture. Or perhaps it suggests that there might be a need for an XML
Schema profile for data binding. Certainly I don't think one can define a
mechanism for integrity constraints using general predicates (which is
certainly needed) without making some assumptions about the data model, and
it's going to be difficult to apply those predicates after converting the
data into a model that is significantly different from the original.

> 
> I've also just noticed the xs:alternative construct.  I 
> haven't had a chance to digest it yet, but it doesn't seem 
> great to me!  It might be helpful in a document oriented 
> world, but in a data oriented world, I'd rather have a 
> simpler language, and modify the schema accordingly, so that 
> you get something like:
> 
>     <message><messageTypeBase64>jkhgkjh</messageTypeBase64></message>
> 

Actually I think the use cases for conditional type assignment come as much
or more from the "data" world as the document world. The overwhelming
experience is that people aren't prepared to design their XML instances to
fit within the constraints imposed by XML Schema, they want to write schemas
that describe the data as they have designed it.
 
> I'm going to find something else to do, because this is 
> depressing me 

Please, first, submit your comments on the spec where they will receive
attention!

Michael Kay
http://www.saxonica.com/
Received on Friday, 12 October 2007 14:41:52 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.