[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: RNG vs. XSD : is the use of abstract types andpolymorphis

  • From: David Lee <dlee@calldei.com>
  • To: "Costello, Roger L." <costello@mitre.org>, "xml-dev@l..."<xml-dev@l...>
  • Date: Tue, 13 Mar 2012 11:44:06 +0000

RE:  RNG vs. XSD :  is the use of abstract types andpolymorphis
Like it or not, XML Schema has this dual use.
Look at JAXB ... its uses XML Schema to create types and their representations in programming languages.
Look at the type system on XQuery and XSLT.  These are full-fledged data types including inheritance.
Inheritance is very useful in type aware XQuery and XSLT usages as you can do matching (xslt) and typeswitching (xquery)
on types and you dont have to enumerate all the types, only a common base type if that is what you want.  
It may or may not have been a mistake to combine syntax with type modeling in XML Schema,
but its more of a mistake to say now after the fact 'don't use them'.

just my opinion.


----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org

> -----Original Message-----
> From: Costello, Roger L. [mailto:costello@mitre.org]
> Sent: Tuesday, March 13, 2012 7:30 AM
> To: xml-dev@lists.xml.org
> Subject: RE:  RNG vs. XSD : is the use of abstract types and
> polymorphism a good or bad thing for schemas for XML?
> 
> Hi Folks,
> 
> I have been thinking about the issue of "inheritance" in schema languages for
> XML.
> 
> Recall that James Clark says (paraphrasing) that it is not the role of a schema
> language to model conceptual or semantic relationships such as inheritance.
> Such relationships are best modeled elsewhere.
> 
> That makes sense to me. Separation of concerns is a good thing. Use a schema
> language to define a template for syntactic organization. Using my chocolates
> example, use a schema language to show the organization of boxes (elements)
> and what chocolates (data) goes into each box.
> 
> Use other technologies for expressing relationships and meaning -- use
> ontologies, data specifications, UML, etc.
> 
> That's a nice, clean separation of concerns. That yields more productivity and
> better results. (Adam Smith, Wealth of Nations)
> 
> I wonder why XML Schemas ever introduced inheritance machinery (derive-by-
> extension, derive-by-restriction, element substitution) into the language?  The
> inheritance machinery muddies things up.  It results in XML Schema trying to be
> both a language of expressing syntactic template and a poor man's pseudo
> UMLish relationship ontology language.
> 
> This muddiness has created enormous confusion over the years.
> 
> "XML Schema is just syntax."
> 
> "No, XML Schema is semantics, just look at the meaning in this inheritance
> tree."
> 
> It seems that the prudent path is to avoid all inheritance machinery in XML
> Schema.
> 
> Don't use derive-by-extension, derive-by-restriction, and element substitution .
> Use XML Schema just for expressing templates of elements and attributes.
> 
> Use ontologies, data specifications, UML, etc. for expressing relationships and
> meaning.
> 
> Thoughts?
> 
> /Roger
> 
> ___________________________________________________________________
> ____
> 
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.