You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ron Blaschke <ma...@rblasch.org> on 2005/01/02 23:22:40 UTC

[plugin] Warning, Errors, Fatals and Libraries (again)

As posted earlier, I am working on a Pod input plugin.  Quite a
number of things are already working, but some are not (quite yet).

I have some questions regarding input plugin development, and I'd
appreciate it if you guys could help me sort them out.  None of these
is required for the plugin to work, but would make things integrate
more smoothly (I guess).

- Libraries
The pod-input plugin requires two additional jars to run.  How should
I distribute them with the plugin?  Just copy them into a lib/
directory in the distribution zip?

- Errors and Warnings
During translation of documents error may pop up.  How should those be
reported?  org.apache.cocoon.ProcessingException in the generator?
How should warnings be reported?  Just System.err.println(..)?

- Tracing
Is there a recommended library which should be used for tracing?
log4j, commons-logging, excalibur-logger, ...?

- forrest validate-xdocs
Are there any plans to allow input plugins to validate their
documents?  Would be a neat feature.

Any comment is greatly appreciated.

Ron








Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ron Blaschke <ma...@rblasch.org>.
Monday, January 3, 2005, 11:31:39 PM, Ross Gardler wrote:

> [No need to reply to me and CC to Forrest, just keep it on Forrest Dev -
> comments in-line]

Sorry about that.

>>>>>>- forrest validate-xdocs
>> Maybe I got things wrong, so let me spell it out.  Please hint me were
>> I got things wrong: There is a separate target, in
>> main/targets/validaton.xml, called validate-xdocs, which uses a task
>> "xmlvalidate" to check the documents.  This process looks separate
>> from the translation.
>> 
>> Since input plugins might handle non XML files, the validaton might no
>> longer be complete.  I just wanted to point this out, for you guys to
>> properly decide on it.

> Yes, I see your point. It would be possible to have Forrest call an Ant
> target in the plugin build file that will validate the input files. 
> If/when the first plugin is built that will do this validation we can
> add this.

Yup, I like that.

Thanks,
Ron





Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ross Gardler <rg...@apache.org>.
[No need to reply to me and CC to Forrest, just keep it on Forrest Dev - 
comments in-line]

Ron Blaschke wrote:
> Monday, January 3, 2005, 8:49:05 PM, Ross Gardler wrote:
> 
>>Ron Blaschke wrote:
>>
>>>>>- forrest validate-xdocs
>>>>
>>>>Validation is done by Forrest itself, all source documents in the
>>>>project are validated when the site is built using "forrest site". There
>>>>is (should be?) no need for plugins to handle validation separately, or
>>>>am I missing your point?
>>>
>>>If I am not wrong, forrest validates the XML documents against their
>>>DTDs.  But the pod-input plugin takes (Perl) Pod files as input, which
>>>are not in XML.  (This might also apply to other future input plugins.)
> 
> 
>>It is the job of the plugin to do whatever is necessary, including any
>>validation. I'm not sure exactly *how* this would be done, perhaps a
>>Cocoon generator to read the POD file and validate it accordingly.
> 
> 
> Maybe I got things wrong, so let me spell it out.  Please hint me were
> I got things wrong: There is a separate target, in
> main/targets/validaton.xml, called validate-xdocs, which uses a task
> "xmlvalidate" to check the documents.  This process looks separate
> from the translation.
> 
> Since input plugins might handle non XML files, the validaton might no
> longer be complete.  I just wanted to point this out, for you guys to
> properly decide on it.

Yes, I see your point. It would be possible to have Forrest call an Ant 
target in the plugin build file that will validate the input files. 
If/when the first plugin is built that will do this validation we can 
add this.

Ross


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005


Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ron Blaschke <ma...@rblasch.org>.
Monday, January 3, 2005, 8:49:05 PM, Ross Gardler wrote:
> Ron Blaschke wrote:
>>>>- forrest validate-xdocs
>>>
>>>Validation is done by Forrest itself, all source documents in the
>>>project are validated when the site is built using "forrest site". There
>>>is (should be?) no need for plugins to handle validation separately, or
>>>am I missing your point?
>>
>> If I am not wrong, forrest validates the XML documents against their
>> DTDs.  But the pod-input plugin takes (Perl) Pod files as input, which
>> are not in XML.  (This might also apply to other future input plugins.)

> It is the job of the plugin to do whatever is necessary, including any
> validation. I'm not sure exactly *how* this would be done, perhaps a
> Cocoon generator to read the POD file and validate it accordingly.

Maybe I got things wrong, so let me spell it out.  Please hint me were
I got things wrong: There is a separate target, in
main/targets/validaton.xml, called validate-xdocs, which uses a task
"xmlvalidate" to check the documents.  This process looks separate
from the translation.

Since input plugins might handle non XML files, the validaton might no
longer be complete.  I just wanted to point this out, for you guys to
properly decide on it.

I have no use case for this, as I usually just create the full site
("forrest site"), or work iteratively on it during "forrest run".  So
this is really a non-issue for me, and probably most others.  Again,
just wanted to make sure people are aware of this.

Thanks for your response.

Ron




Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ross Gardler <rg...@apache.org>.
Ron Blaschke wrote:
>>>- forrest validate-xdocs
>>
>>Validation is done by Forrest itself, all source documents in the
>>project are validated when the site is built using "forrest site". There
>>is (should be?) no need for plugins to handle validation separately, or
>>am I missing your point?
> 
> 
> If I am not wrong, forrest validates the XML documents against their
> DTDs.  But the pod-input plugin takes (Perl) Pod files as input, which
> are not in XML.  (This might also apply to other future input plugins.)

It is the job of the plugin to do whatever is necessary, including any 
validation. I'm not sure exactly *how* this would be done, perhaps a 
Cocoon generator to read the POD file and validate it accordingly.

Ross


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005


Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ron Blaschke <ma...@rblasch.org>.
Monday, January 3, 2005, 8:58:40 PM, Ross Gardler wrote:
> Ron Blaschke wrote:
>> Monday, January 3, 2005, 4:32:55 PM, Ron Blaschke wrote:
>>>Sunday, January 2, 2005, 11:45:19 PM, Ross Gardler wrote:
>>>>Ron Blaschke wrote:

> If there is a strong enough use case for such functionality I do not
> think it is the job of a seperate plugin, rather the job of the relevant
> input plugin that handles the relevant input format (or the core xmaps
> for raw resources).

Right you are.

Ron






Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ross Gardler <rg...@apache.org>.
Ron Blaschke wrote:
> Monday, January 3, 2005, 4:32:55 PM, Ron Blaschke wrote:
> 
>>Sunday, January 2, 2005, 11:45:19 PM, Ross Gardler wrote:
>>
>>>Ron Blaschke wrote:
> 
> 
>>>>- forrest validate-xdocs
>>>
>>>Validation is done by Forrest itself, all source documents in the
>>>project are validated when the site is built using "forrest site". There
>>>is (should be?) no need for plugins to handle validation separately, or
>>>am I missing your point?
>>
>>completeness.  Another thought that just pops up: Should "raw content"
>>files (HTML, ZIP, PNG, ...) get validated?
> 
> 
> Now here's a thought (which may or may not be serious): Would it be
> worth to create another type of plugin, "validation" ?  Just thinking
> out loud here...

If there is a strong enough use case for such functionality I do not 
think it is the job of a seperate plugin, rather the job of the relevant 
input plugin that handles the relevant input format (or the core xmaps 
for raw resources).

Ross


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005


Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ron Blaschke <ma...@rblasch.org>.
Monday, January 3, 2005, 4:32:55 PM, Ron Blaschke wrote:
> Sunday, January 2, 2005, 11:45:19 PM, Ross Gardler wrote:
>> Ron Blaschke wrote:

>>> - forrest validate-xdocs
>> Validation is done by Forrest itself, all source documents in the
>> project are validated when the site is built using "forrest site". There
>> is (should be?) no need for plugins to handle validation separately, or
>> am I missing your point?
> completeness.  Another thought that just pops up: Should "raw content"
> files (HTML, ZIP, PNG, ...) get validated?

Now here's a thought (which may or may not be serious): Would it be
worth to create another type of plugin, "validation" ?  Just thinking
out loud here...

Ron



Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ron Blaschke <ma...@rblasch.org>.
Sunday, January 2, 2005, 11:45:19 PM, Ross Gardler wrote:
> Ron Blaschke wrote:

>> - Libraries
> Yesterday, I committed support for libraries, but it is not documented
> yet (perhaps you could add a section to the docs). Update your version
> of Forrest with "svn up", you can then include libraries in a lib 
> directory in the plugin.

Great, thanks!

>> - Errors and Warnings
>> - Tracing
> These are really Cocoon questions. I'm no expert with Cocoon so I'll let
> someone else answer to ensure it is correct ;-)

>> - forrest validate-xdocs
> Validation is done by Forrest itself, all source documents in the
> project are validated when the site is built using "forrest site". There
> is (should be?) no need for plugins to handle validation separately, or
> am I missing your point?

If I am not wrong, forrest validates the XML documents against their
DTDs.  But the pod-input plugin takes (Perl) Pod files as input, which
are not in XML.  (This might also apply to other future input plugins.)

This validaton is not really necessary for pod-input, b/c a) errors
will pop up during site generation and b) there will be very few
errors, mostly just warning.  I am asking more for sake of
completeness.  Another thought that just pops up: Should "raw content"
files (HTML, ZIP, PNG, ...) get validated?

Ron











Re: [plugin] Warning, Errors, Fatals and Libraries (again)

Posted by Ross Gardler <rg...@apache.org>.
Ron Blaschke wrote:
> As posted earlier, I am working on a Pod input plugin.  Quite a
> number of things are already working, but some are not (quite yet).
> 
> I have some questions regarding input plugin development, and I'd
> appreciate it if you guys could help me sort them out.  None of these
> is required for the plugin to work, but would make things integrate
> more smoothly (I guess).
> 
> - Libraries
> The pod-input plugin requires two additional jars to run.  How should
> I distribute them with the plugin?  Just copy them into a lib/
> directory in the distribution zip?

Yesterday, I committed support for libraries, but it is not documented 
yet (perhaps you could add a section to the docs). Update your version 
of Forrest with "svn up", you can then include libraries in a lib 
directory in the plugin.

> - Errors and Warnings
> During translation of documents error may pop up.  How should those be
> reported?  org.apache.cocoon.ProcessingException in the generator?
> How should warnings be reported?  Just System.err.println(..)?
> 
> - Tracing
> Is there a recommended library which should be used for tracing?
> log4j, commons-logging, excalibur-logger, ...?

These are really Cocoon questions. I'm no expert with Cocoon so I'll let 
someone else answer to ensure it is correct ;-)

> - forrest validate-xdocs
> Are there any plans to allow input plugins to validate their
> documents?  Would be a neat feature.

Validation is done by Forrest itself, all source documents in the 
project are validated when the site is built using "forrest site". There 
is (should be?) no need for plugins to handle validation separately, or 
am I missing your point?

Ross


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30/12/2004