forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud SAHUGUET <sahug...@lucent.com>
Subject Re: problems with relaxng & dtds
Date Fri, 20 Feb 2004 03:44:19 GMT
Dave Brondsema wrote:

>I was working on moving creating a seperate DTD file for skinconfig.  I did 
>that and set up the skinconf.xml files to use it.  However, forrest's build 
>and 'forrest site' had some problems:
>
>1) <jing> is used to validate skinconfig files agains the .rnc file we have for

>it.  When I added the DTD declaration at the top, it attempted to download the 
>file (i'm behind a proxy and the files not there, and most importantly we don't 
>want it to do that anyway).  So I changed it to use <xmlvalidate> with an 
><xmlcatalog> and it worked fine.  So here's the real question: why have relaxng

>schemas at all?  Most editors use DTDs (some support schema now) and I don't 
>know of any that support relaxng.  So we want DTDs as a form of unique 
>identification and versioning; and because editors support them better than 
>other validation formats.  So what are the advantages of having either just 
>relaxng or both relaxng and DTDs.
>
>  
>
I don't know the details of forrest and how it uses either DTDs or RelaxNG.
I can give my view on RelaxNG. It is a very nicely designed schema 
language for XML. It is simple to understand and to implement. But since 
we are just users of already existing validators, this does not really 
matter.
 From a forrest point of view, RelaxNG permits to have more modular 
schemas with backward compatibility for validation. You can extend 
RelaxNG grammars without having to create some special place holders 
(like entities).

Another interesting aspect of RelaxNG is that its creators do not like 
the idea of having in the document a reference to the schema it relates 
to. A given document may be compliant to multiple schemas at the same 
time, expressed in different schema languages. For instance, the way 
nxml (RelaxNG emacs validator by James Clark) is implemented is by 
having a schema file which maps name spaces or root element or file 
extensions to schemas.
So basically the validator reads the beginning of the file and figures 
out which schema to use based on namespaces, element names, etc.

As for editors, there is nxml for emacs.
There is also a couple of them available at www.relaxng.org/#editors

regards,

Arnaud

Mime
View raw message