You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@apache.org> on 2009/05/29 09:35:13 UTC

Re: XInclude preprocessor - new thread for old topic

Brian M Dube wrote:
> 
> There will always be one more place in the DTD to add this
> support.

Yes, that worried me too when the initial XInclude
was added to the DTD.
http://issues.apache.org/jira/browse/FOR-1032

> I found a very old discussion [1] about processing XInclude
> before validation. This makes a lot of sense and the solution would
> still be useful after a move to XHTML2. Does anyone remember any
> efforts to add a preprocessor? and the outcome?
> 
> [1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
Subject: [RT] Entities in XML docs

As usual there were other things that needed to be in place first.

One of those was the ability to do validation in the
Cocoon pipelines. At the moment we do xml validation
using Ant before the Forrest/Cocoon engine starts.

Using Cocoon Validation Transformers
http://forrest.apache.org/howto-dev.html#debug-validation

Also Jing and Trang have a new lease of life.
http://code.google.com/p/jing-trang/

How is tool support these days for "RELAX NG"?

I note that George of oxygenxml.com is contributing
to the Jing-Trang project.

-David

Re: XInclude preprocessor - new thread for old topic

Posted by David Crossley <cr...@apache.org>.
David Crossley wrote:
> 
> Still need to get XInclude processing done a bit earlier
> in the sitemaps.

That is done now. See r781260.

-David

Re: XInclude preprocessor - new thread for old topic

Posted by David Crossley <cr...@apache.org>.
Brian M Dube wrote:
> David Crossley wrote:
> > Brian M Dube wrote:
> > > > 
> > > > FOR-1172 - enable validation of the internal xml
> > > > 
> > > > FOR-1173 - add demonstration of using xml source documents
> > > > without declaring a DTD
> > > 
> > > This looks good. Is the idea to replace the Ant target with pipeline
> > > validation?
> > 
> > I don't know. I like the fact that the intermediate xml
> > is not validated, because one can cram all sorts of
> > non-xdoc elements into the pipeline. e.g. try doing
> > localhost:8888/samples-b/embedded_html.validation.xml
> > 
> > Perhaps we could find a way to exclude certain documents from
> > validation (or from the final report).
> > 
> > I wonder how such validation could operate.
> > 
> > When we do 'forrest site' it provides Cocoon a "start-uri"
> > to commence from. Cocoon appends any other new URIs that it
> > finds during its crawl. It generates the *.html files, etc.
> > 
> > Perhaps we can also get it to generate a "*.validation.xml"
> > for each URI too. Then after Cocoon finishes, an Ant target
> > might post-process all such files and summarise them into
> > one large report. Then tidy up to remove all those files,
> > because we don't want them to be deployed as part of the site.
> > 
> > Do you have some ideas?
> 
> I don't, yet. I'm looking through Cocoon 3 right now; maybe something
> there will align nicely with this approach.

I have come up with a technique using our existing setup,
that i am very pleased with. Will try to finish it soon.

Glad to hear that you are investigating other solutions.

-David

Re: XInclude preprocessor - new thread for old topic

Posted by Brian M Dube <bd...@apache.org>.
On Wed, Jun 03, 2009 at 05:49:57PM +1000, David Crossley wrote:
> Brian M Dube wrote:
> > > 
> > > FOR-1172 - enable validation of the internal xml
> > > 
> > > FOR-1173 - add demonstration of using xml source documents
> > > without declaring a DTD
> > 
> > This looks good. Is the idea to replace the Ant target with pipeline
> > validation?
> 
> I don't know. I like the fact that the intermediate xml
> is not validated, because one can cram all sorts of
> non-xdoc elements into the pipeline. e.g. try doing
> localhost:8888/samples-b/embedded_html.validation.xml
> 
> Perhaps we could find a way to exclude certain documents from
> validation (or from the final report).
> 
> I wonder how such validation could operate.
> 
> When we do 'forrest site' it provides Cocoon a "start-uri"
> to commence from. Cocoon appends any other new URIs that it
> finds during its crawl. It generates the *.html files, etc.
> 
> Perhaps we can also get it to generate a "*.validation.xml"
> for each URI too. Then after Cocoon finishes, an Ant target
> might post-process all such files and summarise them into
> one large report. Then tidy up to remove all those files,
> because we don't want them to be deployed as part of the site.
> 
> Do you have some ideas?

I don't, yet. I'm looking through Cocoon 3 right now; maybe something
there will align nicely with this approach.

Brian

Re: XInclude preprocessor - new thread for old topic

Posted by David Crossley <cr...@apache.org>.
Brian M Dube wrote:
> > 
> > FOR-1172 - enable validation of the internal xml
> > 
> > FOR-1173 - add demonstration of using xml source documents
> > without declaring a DTD
> 
> This looks good. Is the idea to replace the Ant target with pipeline
> validation?

I don't know. I like the fact that the intermediate xml
is not validated, because one can cram all sorts of
non-xdoc elements into the pipeline. e.g. try doing
localhost:8888/samples-b/embedded_html.validation.xml

Perhaps we could find a way to exclude certain documents from
validation (or from the final report).

I wonder how such validation could operate.

When we do 'forrest site' it provides Cocoon a "start-uri"
to commence from. Cocoon appends any other new URIs that it
finds during its crawl. It generates the *.html files, etc.

Perhaps we can also get it to generate a "*.validation.xml"
for each URI too. Then after Cocoon finishes, an Ant target
might post-process all such files and summarise them into
one large report. Then tidy up to remove all those files,
because we don't want them to be deployed as part of the site.

Do you have some ideas?

-David

Re: XInclude preprocessor - new thread for old topic

Posted by Brian M Dube <bd...@apache.org>.
On Tue, Jun 02, 2009 at 01:30:26AM +1000, David Crossley wrote:
> David Crossley wrote:
> > Brian M Dube wrote:
> > > 
> > > There will always be one more place in the DTD to add this
> > > support.
> > 
> > Yes, that worried me too when the initial XInclude
> > was added to the DTD.
> > http://issues.apache.org/jira/browse/FOR-1032
> > 
> > > I found a very old discussion [1] about processing XInclude
> > > before validation. This makes a lot of sense and the solution would
> > > still be useful after a move to XHTML2. Does anyone remember any
> > > efforts to add a preprocessor? and the outcome?
> > > 
> > > [1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
> > Subject: [RT] Entities in XML docs
> > 
> > As usual there were other things that needed to be in place first.
> > 
> > One of those was the ability to do validation in the
> > Cocoon pipelines. At the moment we do xml validation
> > using Ant before the Forrest/Cocoon engine starts.
> > 
> > Using Cocoon Validation Transformers
> > http://forrest.apache.org/howto-dev.html#debug-validation
> > 
> > Also Jing and Trang have a new lease of life.
> > http://code.google.com/p/jing-trang/
> > 
> > How is tool support these days for "RELAX NG"?
> > 
> > I note that George of oxygenxml.com is contributing
> > to the Jing-Trang project.
> 
> In the past i had tried to get some of this working.
> After your message, i resurrected that and managed to
> get a bit further. See:
> 
> FOR-1172 - enable validation of the internal xml
> 
> FOR-1173 - add demonstration of using xml source documents
> without declaring a DTD

This looks good. Is the idea to replace the Ant target with pipeline
validation?

Brian

> While rummaging around i also found a relevant old issue:
> FOR-101 - Move to RelaxNG (with auto generated DTDs for editors)
> 
> Still need to get XInclude processing done a bit earlier
> in the sitemaps.
> 
> -David

Re: XInclude preprocessor - new thread for old topic

Posted by David Crossley <cr...@apache.org>.
David Crossley wrote:
> Brian M Dube wrote:
> > 
> > There will always be one more place in the DTD to add this
> > support.
> 
> Yes, that worried me too when the initial XInclude
> was added to the DTD.
> http://issues.apache.org/jira/browse/FOR-1032
> 
> > I found a very old discussion [1] about processing XInclude
> > before validation. This makes a lot of sense and the solution would
> > still be useful after a move to XHTML2. Does anyone remember any
> > efforts to add a preprocessor? and the outcome?
> > 
> > [1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
> Subject: [RT] Entities in XML docs
> 
> As usual there were other things that needed to be in place first.
> 
> One of those was the ability to do validation in the
> Cocoon pipelines. At the moment we do xml validation
> using Ant before the Forrest/Cocoon engine starts.
> 
> Using Cocoon Validation Transformers
> http://forrest.apache.org/howto-dev.html#debug-validation
> 
> Also Jing and Trang have a new lease of life.
> http://code.google.com/p/jing-trang/
> 
> How is tool support these days for "RELAX NG"?
> 
> I note that George of oxygenxml.com is contributing
> to the Jing-Trang project.

In the past i had tried to get some of this working.
After your message, i resurrected that and managed to
get a bit further. See:

FOR-1172 - enable validation of the internal xml

FOR-1173 - add demonstration of using xml source documents
without declaring a DTD

While rummaging around i also found a relevant old issue:
FOR-101 - Move to RelaxNG (with auto generated DTDs for editors)

Still need to get XInclude processing done a bit earlier
in the sitemaps.

-David