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

Re: xs:choice support

From: <Paul.V.Biron@kp.org>
Date: Thu, 20 Apr 2006 13:19:03 -0700
To: edday@obj-sys.com
Cc: gcowe@origoservices.com, public-xsd-databinding@w3.org, public-xsd-databinding-request@w3.org
Message-Id: <OFC88B45AC.B6BC7B99-ON88257156.006F8278-88257156.006FA254@KP.ORG>
> 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 

Received on Thursday, 20 April 2006 20:23:40 UTC

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