[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Subtyping in XML
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 . ......................................................
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|