Re: Xml Schema profile

----- Original Message From: <noah_mendelsohn@...>

> (BTW:  here I offer my personal opinion which may or may not be exactly
> that of my employer, IBM)
>
> As we discussed at the workshop, I think it's important to note that some
> of the issues with things like substitution groups have to do with
> characteristics of some of the programming languages that are being
> commonly used.  Languages like Java and C have no standard means of doing
> tag'd unions, which are arguably a natural model for binding substitution
> groups.  As several respondents on this thread have noted, substitution
> groups can be very useful in XML.  While I'm not insensitive to the
> practical issues that arise in building simple databinding tools, I don't
> think we should "dumb down" XML to work around what might be viewed as
> deficiences of certain programming languages.   FWIW,  other languages
> (PASCAL, among others, as I recall) have had tagged unions over the years.

I certainly don't think the absence of tagged unions is a reason not to 
implement substitution groups in the languages you mention.  Most uses of 
C's union have to be tagged through some means to be effective anyway.  As 
Java does not have a union construct, it's implementation of such constructs 
maybe slightly inefficient, but since the content will either be plain 
ordinary data types or a bunch of references, this lack of inefficiency is 
most likely insignificant.  The OO languages also have the machinery to hide 
such issues behind a suitable interface.

So I agree, XML does not need to be dumbed down for this reason.  After all, 
you'd have to get rid of xs:choice if you followed the same logic, and to 
me, that is fundamental to XSD!

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

Received on Tuesday, 26 September 2006 10:59:29 UTC