You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Arnaud SAHUGUET <sa...@lucent.com> on 2004/02/18 00:49:58 UTC

RelaxNG vs DTDs for forrest validation

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


Re: Helping out for 0.6

Posted by David Crossley <cr...@apache.org>.
Florian G. Haas wrote:
> Nicola Ken Barozzi wrote:
> | We need to get 0.6 out of the door. AFAIK there are two blockers for it:
> |
> | 1 - remove the need for copying
> | 2 - put the finishing touches&docs to the new krysalis skin
> |      + skin system
> 
> And in addition, there's currently 28 unassigned issues in JIRA, 11 of them 
> classified as bugs. Could one of you committers please root through these, 
> close those that have been fixed, and defer those that can't be reproduced or 
> won't be fixed for design reasons? It would be extremely helpful for would-be 
> contributors to know just *where* help is needed so you guys can launch 0.6. 

Sure, we will try. If there are any Issues that you deem important
then please add some investigative comments to them and/or vote for
them.

Of course the documentation is one big area where we need help.
Please create Issues for any documentation that you feel is unclear.
Better still, add some patches for documentation enhancements.

Thanks for your interest and for your offer to contribute.

--David



Helping out for 0.6 (was Re: RelaxNG vs DTDs for forrest validation)

Posted by "Florian G. Haas" <f....@gmx.net>.
On Wednesday 18 February 2004 19:47, Nicola Ken Barozzi wrote:
| We need to get 0.6 out of the door. AFAIK there are two blockers for it:
|
| 1 - remove the need for copying
| 2 - put the finishing touches&docs to the new krysalis skin
|      + skin system

And in addition, there's currently 28 unassigned issues in JIRA, 11 of them 
classified as bugs. Could one of you committers please root through these, 
close those that have been fixed, and defer those that can't be reproduced or 
won't be fixed for design reasons? It would be extremely helpful for would-be 
contributors to know just *where* help is needed so you guys can launch 0.6. 

Thanks a lot,
Florian

-- 
Florian G. Haas <f....@gmx.net> 

GnuPG key ID: 0x46D00BE3
Key fingerprint: 18B4 3E7B 191E F534 254A  1F7C 816D 950B 46D0 0BE3

My GnuPG key is available from the public PGP key server at
pgp.mit.edu (and various other key servers).



Re: RelaxNG vs DTDs for forrest validation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
> Nicola Ken Barozzi wrote:
...
>> With the next release we will switch to XHTML2, that has a RelaxNG 
>> grammer.
> 
> I have been listening that for a while. We need to write down a plan to
> switch to xhtml2 otherwise we will not ever switch.

We need to get 0.6 out of the door. AFAIK there are two blockers for it:

1 - remove the need for copying
2 - put the finishing touches&docs to the new krysalis skin
     + skin system

> As an overall we need:
> 
> Add xhtml schema + validation

XHTML2 already has a RelaxNG validation ready AFAIK.

> Migrate the input stylesheets (*2document.xsl to *2xhtml.xsl)
(also with a new document2xhtml.xsl stylesheet) for backward compat with 
source files

> Migrate the ouput stylesheets (For each skin migrate the document2*.xsl)

This means that we will break compatibility with the previous skins.
For me it's ok, as IMHO the compatibility we must ensure is with the 
sources.

Others?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: RelaxNG vs DTDs for forrest validation

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi wrote:
> Arnaud SAHUGUET wrote:
> 
>> Hi,
>>
>> are there plans to move away from DTDs and adopt RelaxNG instead?
> 
> 
> Yes :-)
> 
> With the next release we will switch to XHTML2, that has a RelaxNG grammer.
> 

I have been listening that for a while. We need to write down a plan to
switch to xhtml2 otherwise we will not ever switch.

As an overall we need:

Add xhtml schema + validation
Migrate the input stylesheets (*2document.xsl to *2xhtml.xsl)
Migrate the ouput stylesheets (For each skin migrate the document2*.xsl)

I hope that this will allow to get a more flexible forrest.


WDYT?

Cheers,
Cheche



Re: RelaxNG vs DTDs for forrest validation

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Nicola Ken Barozzi wrote:
> With the next release we will switch to XHTML2, that has a RelaxNG grammer.

James Clark's nXML comes with a variety of RNC grammars, including
one for XHTML 1.0/1.1.
BTW I think it would be really nice if the Forrest team had a look
at the schema catalog in nXML...
See
  http://www.thaiopensource.com/download/

Note that there's also trang and a set of scripts for converting DTDs
via RNG to RNC.

J.Pietschmann

Re: RelaxNG vs DTDs for forrest validation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Arnaud SAHUGUET wrote:
> Hi,
> 
> are there plans to move away from DTDs and adopt RelaxNG instead?

Yes :-)

With the next release we will switch to XHTML2, that has a RelaxNG grammer.

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

This is another feature that is in plan, that is input format plugins. 
Gosh, so many things to do, so little time! :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------