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

Re: RE: RELAX NG and type derivation [Was:] XQuery and DTD/Sch

Re:  RE: RELAX NG and type derivation [Was:] XQuery and DTD/Sch
Michael Fitzgerald scripsit:
> RELAX NG can do type derivation by restriction, union, and list. In some
> ways, RELAX NG's list type derivation is more powerful that XML Schema's
> derivation.[1] All the facets that are available in XML Schema are available
> in implementations of RELAX NG. In what specific ways does RELAX NG fall
> short in type derivation?

I think I explained this before, but maybe it didn't take.

A WXS schema imposes three kinds of constraints:

1) Schema-instance constraints: if an attribute is declared to have a
certain (simple) type in the schema, then all values of that attribute
in the instance must conform to the type.

2) Instance-instance constraints: if an attribute is declared to be
unique, then no two values of that attribute in the instance may be
equal (according to the definition of "equality" for the attribute's

3) Schema-schema constraints: if a complex type is said to be derived
by restriction from another complex type, then it must redeclare the
components of that type either unchanged or reduced in what may be
called "strength".

RNG does not have constraints of types 2 or 3.  Therefore, it cannot
specify complex type derivation by restriction.  In addition,
restricting simple types by facet is not a first-class operation,
so once a built-in simple type has been restricted by facets, 
it can't be restricted further.  This is a place where WXS is
genuinely more orthogonal than RNG.

(IMHO the way in which complex type derivation by restriction is
done is bogus, because it generates fragile subclasses, a kind of
bassackwards version of the well-known "fragile superclass" problem 
in OO.)

John Cowan   <jcowan@r...>   http://www.ccil.org/~cowan
"One time I called in to the central system and started working on a big
thick sed and awk heavy duty data bashing script.  One of the geologists
came by, looked over my shoulder and said "Oh, that happens to me too.
Try hanging up and phoning in again."  --Beverly Erlebacher


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.
First Name
Last Name
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.