You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Cyriaque Dupoirieux <Cy...@pcotech.fr> on 2005/09/26 16:51:13 UTC

[Pipeline Question ?]

Hi,

    I need to generate new files for my site. These new files will have 
the same content as the generated XHTML files but with a specific 
extension and a few minor changes...

    I have created an output plugin to do this - based on the text 
output plugin.
    But I am not used to manage pipelines or other cocoon concepts.
    My problem is :

    * how to generate files exactly as standard forrest does (XHTML) - I
      can't find it in the different xmap files.

And after, I think I will be able to apply another stylesheet to add my 
minor changes.

(Don't know if I have been clear enough ;-) ...)

-- 

Regards,
Cyriaque,


Re: [Pipeline Question ?]

Posted by Ross Gardler <rg...@apache.org>.
Cyriaque Dupoirieux wrote:
> Ross Gardler a écrit :
> 
>> Cyriaque Dupoirieux wrote:
>>
>>> Hi,
>>>
>>>    I need to generate new files for my site. These new files will 
>>> have the same content as the generated XHTML files but with a 
>>> specific extension and a few minor changes...
>>>
>>>    I have created an output plugin to do this - based on the text 
>>> output plugin.
>>>    But I am not used to manage pipelines or other cocoon concepts.
>>>    My problem is :
>>>
>>>    * how to generate files exactly as standard forrest does (XHTML) - I
>>>      can't find it in the different xmap files.
>>
>>
>>
>> Do you mean content? In which case you want "body-filename.html"
>>
>> If you mean with all the Forrest decorations I'm a little confused by 
>> the question. To get the XHTML version of the page simply request 
>> *.html. So in your plugin you would have:
>>
>> <map:match pattern="**.myExtension"?
>>   <map:generate src="cocoon://{1}.html"/>
>>   ...
>> </map:pattern>
> 
> 
> Excellent ! You are a Genius (or I am a Cocoon newbie :-D , but I 
> practice !)

I'm no genius - that is for sure.

If you are not familiar with the Cocoon: protocol yet, you will grow to 
love it. You can call any pipeline in the system using it. In general:

cocoon:/ - calls a pipeline in the current sitemap (i.e. mounted sitemap)
cocoon:// - calls the first matching pipeline it finds from the initial 
sitemap (i.e. the one doing the mounting)

There is more power to come when we enable wiring in plugins. But we'll 
worry about that when I find the time to do that work.

Ross


Re: [Pipeline Question ?]

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
Ross Gardler a écrit :

> Cyriaque Dupoirieux wrote:
>
>> Hi,
>>
>>    I need to generate new files for my site. These new files will 
>> have the same content as the generated XHTML files but with a 
>> specific extension and a few minor changes...
>>
>>    I have created an output plugin to do this - based on the text 
>> output plugin.
>>    But I am not used to manage pipelines or other cocoon concepts.
>>    My problem is :
>>
>>    * how to generate files exactly as standard forrest does (XHTML) - I
>>      can't find it in the different xmap files.
>
>
> Do you mean content? In which case you want "body-filename.html"
>
> If you mean with all the Forrest decorations I'm a little confused by 
> the question. To get the XHTML version of the page simply request 
> *.html. So in your plugin you would have:
>
> <map:match pattern="**.myExtension"?
>   <map:generate src="cocoon://{1}.html"/>
>   ...
> </map:pattern>

Excellent ! You are a Genius (or I am a Cocoon newbie :-D , but I 
practice !)

Cyriaque,

>
> Ross
>
>

Using XConf extensions

Posted by Ross Gardler <rg...@apache.org>.
Alex Batlin wrote:
> Ross,

A couple of things about this mail list. First, please do not CC 
individual developers. We all get the mails via the dev list, CC'ing 
only serves to doubles the mail to one developers inbox and can easily 
result in replying to the wrong message, meaning the reply does not go 
to the list.

Secondly, please create a new thread for each new topic, this makes the 
mailing list much easier to follow, especially in the archives.

Now, to your mail..

> I was excited to see the addition of xconf capability into plugins. See
> http://svn.apache.org/viewcvs?rev=227190&view=rev.
> 
> I rebuild cocoon with authentication and session blocks, and added the jars
> to 'plugin/lib' and the xconf files from the
> 'cocoon-2.2.0-dev\build\webapp\WEB-INF\xconf' to 'plugin/conf'.

...

> So am bit confused, on two counts:
> 1. if xpatch is required, how do I generate this file?
> 2. why are we using xpatch, when the current cocoon.xconf uses includes,
> can't we do the same here?

This was a rather hasty commit of mine that I have not yet fixed, even 
though David spotted it as soon as I committed. Sorry that it has stung you.

My original solution for including config files for plugins was to use 
the XPatch utility. This sat on my hard drive for some time because I 
had a few minor issues to iron out before committing. Then somebody 
needed some functionlaity from my local "branch" that also contained the 
XConf code. I committed in a hurry, not noticing that I still used the 
XPatch method.

The good news is that I have also enabled the XConf includes 
functionality. But this has not yet been leveraged for plugins.

There are two short term workarounds for you:

1) Use the XPatch facility (see Cocoon docs on XPatch)
2) is to edit the main/webapp/cocoon.xconf and add the include you need, 
it will work ust fine.

If you opt for one be aware that we will be removing this in favour of 
using the includes at some point before the 0.8 release.

The long term solution to the problem is to create a plugin.xconf file 
that s built each time Forrest is run, much the same as we do with the 
sitemap mounts for plugins. We would welcome a patch for this, I can 
help point you in the right direction if you fancy tackling it.

Could you please create an issue for this and point to this thread in 
the archives so I do not forget again.

Ross


RE: [Pipeline Question ?]

Posted by Alex Batlin <al...@batlin.com>.
Ross,

I was excited to see the addition of xconf capability into plugins. See
http://svn.apache.org/viewcvs?rev=227190&view=rev.

I rebuild cocoon with authentication and session blocks, and added the jars
to 'plugin/lib' and the xconf files from the
'cocoon-2.2.0-dev\build\webapp\WEB-INF\xconf' to 'plugin/conf'.

This error message was returned:

BUILD FAILED
D:\apps\forrest-0.8\plugins\build.xml:339: The following error occurred
while executing this line:
D:\apps\forrest-0.8\main\targets\plugins.xml:348: The following error
occurred while executing this line:
D:\apps\forrest-0.8\main\targets\plugins.xml:370: The following error
occurred while executing this line:
D:\apps\forrest-0.8\main\targets\plugins.xml:390: Not a valid xpatch file:
D:\apps\forrest-0.8\build\plugins\com.batlin.forrest.plugin.internal.profile
d\conf\cocoon-authentication-fw.xconf

So am bit confused, on two counts:
1. if xpatch is required, how do I generate this file?
2. why are we using xpatch, when the current cocoon.xconf uses includes,
can't we do the same here?

Many thanks,


Alex.



including xconf files in a plugin

Posted by Alex Batlin <al...@batlin.com>.
Ross,

I was excited to see the addition of xconf capability into plugins. See
http://svn.apache.org/viewcvs?rev=227190&view=rev.

I rebuild cocoon with authentication and session blocks, and added the jars
to 'plugin/lib' and the xconf files from the
'cocoon-2.2.0-dev\build\webapp\WEB-INF\xconf' to 'plugin/conf'.

This error message was returned:

BUILD FAILED
D:\apps\forrest-0.8\plugins\build.xml:339: The following error occurred
while executing this line:
D:\apps\forrest-0.8\main\targets\plugins.xml:348: The following error
occurred while executing this line:
D:\apps\forrest-0.8\main\targets\plugins.xml:370: The following error
occurred while executing this line:
D:\apps\forrest-0.8\main\targets\plugins.xml:390: Not a valid xpatch file:
D:\apps\forrest-0.8\build\plugins\com.batlin.forrest.plugin.internal.profile
d\conf\cocoon-authentication-fw.xconf

So am bit confused, on two counts:
1. if xpatch is required, how do I generate this file?
2. why are we using xpatch, when the current cocoon.xconf uses includes,
can't we do the same here?

Many thanks,


Alex.


Re: [Pipeline Question ?]

Posted by Ross Gardler <rg...@apache.org>.
Cyriaque Dupoirieux wrote:
> Hi,
> 
>    I need to generate new files for my site. These new files will have 
> the same content as the generated XHTML files but with a specific 
> extension and a few minor changes...
> 
>    I have created an output plugin to do this - based on the text output 
> plugin.
>    But I am not used to manage pipelines or other cocoon concepts.
>    My problem is :
> 
>    * how to generate files exactly as standard forrest does (XHTML) - I
>      can't find it in the different xmap files.

Do you mean content? In which case you want "body-filename.html"

If you mean with all the Forrest decorations I'm a little confused by 
the question. To get the XHTML version of the page simply request 
*.html. So in your plugin you would have:

<map:match pattern="**.myExtension"?
   <map:generate src="cocoon://{1}.html"/>
   ...
</map:pattern>

Ross