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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] can you use inheritance (extension) in relax ng?

[ Lists Home | Date Index | Thread Index ]

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>
> 
> 






 

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

Copyright 2001 XML.org. This site is hosted by OASIS