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?

Simon touches on one of several divides, and they come down to "what is the
purpose of this schema"

I have used XSD an inheritance to define information models. Information
models benefit from abstract types and derivation because extensibility may
be the primary concern.

In a particular application, I may wish to invalidate a message that conveys
information that I do not understand, i.e., I may need to reject a validly
derived but incomprehensible message. This may because the application has a
restricted purpose. My smart refrigerator-based Bar-coded food inventory can
legitimately reject power tools, even if they have valid bar codes. This may
because of a restricted profile for a restricted market. It may be a version
issue, as my v1 system does not understand the options of your v2 message.

WS-I (Interoperability) addresses this be explicitly disallowing the type of
optionality that comes with substitution groups. This does not mean that
substitution groups are bad, it means that they have their place and you
must know if you  are in that place. It is routine to take a information
defined with a substitution group and create a derived schema with a CHOICE
of the derived types that fit a particular WS-I profile.

I have not seen a lot of conversation about this--but that may be my
ignorance of the right readings. I tend toward language such as the
Information Schema and the Application Schema, and the WS-I Profile.

The pleasure of the XML Schema is that it can be used for many things.
The challenge of the XML Schema is that many parts of it should not be used
for many purposes.
The tragedy of the XML Schema is that many practitioners, particularly
tool-based practitioners, do not distinguish between the purposes, and use a
schema built for one purpose for another. 

The same can be said, IMO, for RNG

So: is there a common language describing the purpose of a schema? Is that
language associated with rules for how one should build the schema within
that purpose? Even more to the point is there tooling for, say, validating
an application schema against an information model schema?


"If something is not worth doing, it`s not worth doing well" - Peter Drucker

Toby Considine
TC9, Inc
TC Chair: oBIX & WS-Calendar
TC Editor: EMIX, EnergyInterop
U.S. National Inst. of Standards and Tech. Smart Grid Architecture Committee

Email: Toby.Considine@gmail.com
Phone: (919)619-2104
blog: www.NewDaedalus.com

-----Original Message-----
From: Simon St.Laurent [mailto:simonstl@simonstl.com] 
Sent: Friday, March 16, 2012 9:25 AM
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?

On 3/14/12 9:03 PM, Rick Jelliffe wrote:
> I like what Norm wrote.I'd add a couple of things.

As do I, though my things are a little different.

 From my perspective, W3C XML Schema was a trainwreck because its foundation
structures came from the languages people wanted to use to process XML with,
not from much precedent in markup itself.  Classical inheritance was the way
of Java and C++ and many others, and was apparently a siren call few could

Simon St.Laurent

[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