W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > April 2006

Re: xs:choice support

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Fri, 21 Apr 2006 12:29:08 +0100
Message-ID: <003801c66536$d61d94a0$0600a8c0@RW>
To: <edday@obj-sys.com>, <Paul.V.Biron@kp.org>
Cc: <gcowe@origoservices.com>, <public-xsd-databinding@w3.org>, <public-xsd-databinding-request@w3.org>

I agree with Ed and Paul here.  Support for xs:choice seems fundamental. 
You could offer some advice along the lines of "You may wish to check that 
your tool supports xs:choice.  If it does not, you may wish to choose 
another tool!"  However, I wouldn't advice against using xs:choice in 

Pete Cordell
Tech-Know-Ware Ltd
                         for XML to C++ data binding visit
                         (or http://www.xml2cpp.com)

----- Original Message ----- 
From: <Paul.V.Biron@kp.org>
To: <edday@obj-sys.com>
Cc: <gcowe@origoservices.com>; <public-xsd-databinding@w3.org>; 
Sent: Thursday, April 20, 2006 9:19 PM
Subject: Re: xs:choice support

>> I have seen this mentioned as a limitation in some binding products
>> and, quite frankly, I don't understand it.  In general, all a binder
>> needs to do is examine the start tag of the element and it can
>> determine the contents.  It can then use something like a union type
>> in C to hold the different alternatives or a base class with
>> generated derived classes in an OO language.  It shouldn't be that hard
> to do.
> or you can always include each child of the choice as member variables and
> add a bit of conditional code to constructors and setters to keep things
> consistent.  I agree that implementing choice shouldn't be rocket science
> :-(
> pvb 
Received on Friday, 21 April 2006 11:29:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:12 UTC