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

RE: DTDs, W3C Schemas, RELAX NG, Schematron?

  • To: "James Clark" <jjc@j...>,"John Cowan" <jcowan@r...>
  • Subject: RE: DTDs, W3C Schemas, RELAX NG, Schematron?
  • From: "Don Box" <dbox@m...>
  • Date: Sun, 23 Jun 2002 22:32:15 -0700
  • Cc: <xml-dev@l...>
  • Thread-index: AcIbPmiP74o84k0aQwG9K2vjkPEY2AAAG2xg
  • Thread-topic: DTDs, W3C Schemas, RELAX NG, Schematron?

schematron type of a value
> -----Original Message-----
> From: James Clark [mailto:jjc@j...]
> Sent: Sunday, June 23, 2002 10:15 PM
> To: Don Box; John Cowan
> Cc: xml-dev@l...
> Subject: Re:  DTDs, W3C Schemas, RELAX NG, Schematron?
> 
> 
> > > 5) RNG allows a (simple) datatype to be restricted not only by
facet,
> > > but by explicit extension and exception.  One can write
'xsd:integer -
> > > "0"' to mean a nonzero integer (although unfortunately "00" will
still
> > > validate), or 'xsd:integer | "Inf" | "+Inf" | "-Inf"' when a value
may
> > > be integral or infinite.
> >
> > Wow! I was knocked out by this one. What good are datatypes if one
can
> > [not] work in terms of the value space of the type rather than the
> lexical
> > form?
> 
> In RNG, you can work in terms of the value space.  If you want a
non-zero
> integer, you can say
> 
> xsd:integer - xsd:integer "0"
> 
> or
> 
> <data type="integer">
>   <except>
>     <value type="integer">0</value>
>   </except>
> </data>

Thanks for the clarification. This seems reasonable. 

>  > I've found that the most important difference between RNG and XML
> > Schemas is wrt the underlying type model.
> >
> > Specifically, XML Schema uses named types to implicitly convey
intention
> > as well as structure (a la Java, C++, C#). Anonymous types are 2nd
class
> > citizens in XML Schema (they're type-equivalent with nothing).
> >
> > Relax NG has a much looser model (a la Perl) in which two things are
> > compatible if they share structure independent of a common, named
type
> > definition.
> >
> > Each approach appeals to its own community of users in very deep
ways.
> 
> I agree that the emphasis on named typing in W3C XML Schema is a
profound
> difference from RNG.  One interesting question is whether it would be
> possible to build a schema language that supports named typing yet
still
> has
> (at least most of) the simplicity and power of RNG.  

I had this thought myself recently, but frankly, I think lack of named
typing is RNG's primary attraction for most people. 

> However, I still have
> my doubts that named typing is appropriate for XML.  I would speculate
> that
> named typing is part of what makes use of DCOM and CORBA lead to the
kind
> of
> relatively tight coupling that is exactly what I thought we were all
> trying
> to avoid by moving to XML.

I admit that it's a very weird dynamic. 

Correct me if I'm wrong, but even with RNG, equivalence still relies on
common element names unless wildcards are used everywhere, no?  

DB



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.