W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2006

Re: Xml Schema profile

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Tue, 26 Sep 2006 11:59:13 +0100
Message-ID: <002401c6e15a$d4717770$5000a8c0@RW>
To: <paul.downey@bt.com>, <noah_mendelsohn@us.ibm.com>
Cc: <xmlschema-dev@w3c.org>

----- 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:55 GMT