Re: Extending "choice" model group in a xsd schema

On Fri, Jan 8, 2010 at 9:05 PM, Michael Kay <mike@saxonica.com> wrote:
> The odd thing though is that the OO languages I'm familiar with treat the
> fields/methods on a class as a set rather than a sequence, and a subclass
> can add members to this set; so they don't have any kind of user-visible
> constraint like the one in XSD that says the additions have to be at the end
> of the sequence.

I'm not sure, if comparing unordered fields/methods of a OO class to
say a XSD sequence, is the right thing to do. My experience with OO
languages, convinces me that unordered fields/methods is the right
design for OO languages. Giving order to fields/methods in an OO
program doesn't look right to me (because when the object's consumer
invokes an object's methods, order of methods or says fields, is not
significant -- or to say, is not required from a OO system).

Whereas, ordering (say the element order) is an important requirement
in XML documents.


-- 
Regards,
Mukul Gandhi

Received on Friday, 8 January 2010 16:52:55 UTC