forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud SAHUGUET <sahug...@lucent.com>
Subject RelaxNG vs DTDs for forrest validation
Date Tue, 17 Feb 2004 23:49:58 GMT
Hi,

are there plans to move away from DTDs and adopt RelaxNG instead?

As an example, I want to extend the forrest document schema with some 
special tags to support in-lining of publications. In a project page, I 
want to add publications related to this project.
For that it would be convenient to have the schema support any tag from 
an external namespace and change the stylesheet to interpret the tag 
accordingly.

Because of the rigidity to DTDs, the only thing I managed to come up 
with (for the publication feature) is to add some special attributes for 
the <p> tag and change the stylesheet accordingly. That's a bit ad-hoc.
<p publication=""  project="forrest"/> is a valide entry in a forrest 
document and the stylesheet interprets it via a <xsl:template 
match="p[@publication]">.

Another way would be to define my own DTD for documents. But this is 
annoying because I need to change it whenever the forrest document DTD 
changes. With RelaxNG, I can define my schema as an extension of the 
forrest schema (I just say that the main content model can contain 
<publication> entries) and I am all set.

I haven't looked at the code of forrest in terms of validation. But 
RelaxNG comes with a suite of open source Java tools that could be used 
for validation. James Clark has also developed an amazing mode for emacs 
with incremental validation of documents against RelaxNG schemas.

regards,

Arnaud


Mime
View raw message