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] Relax NG, Thoughts, etc.

[ Lists Home | Date Index | Thread Index ]

Nathan Young scripsit:

> Is your statement that XSD draws this distinction based on the fact that  
> some documents represent data that conforms to the model set forth in the 
> XSD, while relaxNG draws this distinction based on the fact that some  
> documents are structured in accordance to the grammatical rules set forth 
> while others do not?

I like to think of it like this:  RELAX NG only imposes schema-instance
constraints; that is, the rules specified in the schema dictate what
the instance can and can't contain.

XML Schema also has rules of this kind, but additionally it has
schema-schema constraints, where parts of the schema dictate what other
parts of the schema can and can't be.  For example, if the schema says
that the 'foo' type is an extension-by-restriction of the 'bar' type,
then the child elements and attributes allowed for elements of type
'foo' are a subset of those allowed for type 'bar'.

XML Schema also has instance-instance constraints, where parts of the
instance are dictated by the content of other parts.  DTDs and RELAX
NG have these only in the form of ID, IDREF, and IDREF attributes.

-- 
John Cowan  cowan@ccil.org  http://www.ccil.org/~cowan
Does anybody want any flotsam? / I've gotsam.
Does anybody want any jetsam? / I can getsam.
        --Ogden Nash, No Doctors Today, Thank You




 

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

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