OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Subtyping in XML

[ Lists Home | Date Index | Thread Index ]


Paul Prescod wrote:

> The "especially if the processing language is OO" paren is important.
Type
> inheritance can simplify your code *if* you are using some type-aware
data
> binding technology *and* you design your schema so that it is
compatible
> with this data binding technology (in my experience they are very
fragile
> in the fact of mildly complex DTDs). 


IMO this is the scenario where derivation by extension can prove
valuable. Although in general I'm not a huge fan of XML <-> object
mappings, I've see that it can simplify the XML processing code for
object wonks that can't see past the angle brackets. 


> > ...  And as Henry suggests, the author of the schema (and the
> > processing system) is in control of the schema and defines all
> > possible types accepted.
> 
> Basically I don't see this as a particularly interesting definition
for
> "extensible". Imagine if the common wisdom in the Java world is that
you
> shouldn't extend classes made by someone else! 


I understand your argument but guess I'm approaching from the WS
perspective where the author of the service defines the interface and
it's less likely that consumers would try sending their own extended
types in.

I can appreciate the argument that restriction would provide a safer
model in pure XML type hierarchies. However, if OO developers stay
within the (XML Schema) bounds of what makes sense in their OO systems
and apply the same design principles there, is extension really that big
of an issue? And isn't the mapping much more natural?

-aaron

......................................................
. Aaron Skonnard, DevelopMentor (http://skonnard.com).
.  Essential XML Quick Reference available online!   .
.    Download PDFs: http://www.develop.com/books     .
......................................................





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS