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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] RNG vs. XSD : is the use of abstract types and polymorphism a good or bad thing for schemas for XML?

That kind of separation seems logical, particularly in the context of
maintaining the ontology separately, whilst the XML Schemas are manually
kept in sync with the ontology.

Other contexts however do exist:
Imagine an UML ontology which is making good use of abstract classes and
inheritance. Suitable tools can translate UML and generate the XML library
schema components (similar to OASIS UBL's CBC and CAC library schemas). The
generated library components mirror the UML inheritance and abstract
classes. On the other hand, the actual XML document schemas, which are
composed by cherry picking from the XML library components, are not allowed
to define new abstract types or new inheritances.
Such governed use of inheritance and abstract types is almost invisible when
looking at a document schema (good for users), yet provides benefits in
component library structure and use.
For example, document schemas can include the automatically embedded
documentation containing the plain text definition of the UML class
attribute, some of which happen to be inherited attributes.

Just to add a different perspective. 


> -----Original Message-----
> From: Costello, Roger L. [mailto:costello@mitre.org]
> Sent: Wednesday, 14 March 2012 12:30 a.m.
> To: xml-dev@lists.xml.org
> Subject: RE: [xml-dev] 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
> 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
> language to define a template for syntactic organization. Using my
> example, use a schema language to show the organization of boxes
> 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
> 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
> to be both a language of expressing syntactic template and a poor man's
> 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
> Schema.
> Don't use derive-by-extension, derive-by-restriction, and element
> . Use XML Schema just for expressing templates of elements and attributes.
> Use ontologies, data specifications, UML, etc. for expressing
> and meaning.
> Thoughts?
> /Roger
> _______________________________________________________________________
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS to
> XML implementation and development. To minimize spam in the archives, you
> 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]

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

Copyright 1993-2007 XML.org. This site is hosted by OASIS