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

Re: can you use inheritance (extension) in relax ng?


rng inheritance
Gustaf Liljegren wrote:
> At 06:54 2003-10-25 -0700, Dare Obasanjo wrote:
> 
>>As a document validation language RNG is simpler, more
>>expressive and less verbose than W3C XML Schema. As a
>>datayping language W3C XML Schema is the only game in
>>town [...]
> 
> Can you (or someone else) elaborate on this? I don't understand what
> features are missing från RNG as a "datatyping language" (what's that?). It
> has the existing datatypes from WXS, it has the ability to construct regex
> patterns, it has named patterns for complex types. What's not there?

RNG doesn't have type derivation. You can parameterize an existing type 
but you can't define a new named type based on an existing one.

RNG doesn't have "complex types" at all. One might argue that nothing is 
better than XML Schema's faux-OOP extension types, but a case could be 
made for named patterns. Some think it handy in a query language to 
know, e.g., that all arguments to a function match a certain pattern. 
(Some don't.)

More subtly, RNG is designed for validation, not type assignment. 
Because RNG patterns are closed under union, it can easily happen that a 
given sequence is valid according to more than one pattern, and there is 
no decision procedure to choose which pattern to use in assigning a 
type. XML Schema resolves such issues by a "first match" rule for its 
union (simple) types and by disallowing ambiguity in complex types.

> I think the day Microsoft turns to RNG will be a lucky day for XML.

Amen to that.

Bob Foster

> Gustaf
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
> 
> 



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.