You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Carles Canellas <cc...@yahoo.es> on 2002/10/23 11:46:24 UTC

Question. cocoon.xconf and skin

Well, I've got another question about forrest in
webapps and war, I'm not sure why it works that way.

When I override the skin to use in the properties
file, and invoke the ant via forrest script, it's used
in filters, but in the cocoon.xconf in WEB-INF is not
changed, so I have to change it manually.

I have seen 4 solutions for that.
1: Change it manually, really not the sollution
2: Wait for a dreamware sollution named siteplan
(well, I don't like to wait)
3: Put my own cocoon.xconf in conf subdirectory (If I
change the skin, I have to change it in two places:
properties and xconf)
4: put an xslt transformation that changes the skin in
xconf for the one present as property, in the ant task
before creating the war and in the one that creates
the webapp.

I have chosen the 4th. There's another solution? If
that solution is OK, I can send the diff's in the
build and the stylesheet (very simple one)

Carles, starting on forrest.

=====
Carles Canellas.
Vicer Tec S.L.

_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://messenger.yahoo.es

Re: [patch] cocoon.xconf and skin

Posted by Jeff Turner <je...@apache.org>.
Thanks!  I applied the part of the patch fixing the skin/images filtering
bug.  For the skin selection bug, it occurred to me that simply replacing
'forrest-site' with '@skin@' and switching on filtering will do the
trick.  Please let us know if it's still broken after this.

--Jeff

On Wed, Oct 23, 2002 at 07:05:03PM +0200, Carles Canellas wrote:
> Hello.
> I send you a patch to solve the problem with the skin.
> It consist of some changes in the forrest.build.xml
> ant file and a file called skin4xconf.xsl, that does
> the transformation of the cocoon.xconf. (I have put it
> for working in the resources/library/xslt directory,
> change the ant file if there's a place better for ti)
> 
> I include a solution for anothe bug, in
> forrest.build.xml; there was a filtering on in the
> project-context target for the skins, including
> (that's the error) the skins/images directory, that
> could cause errors in the images copied. I have
> separated it in two copies, like the bare-context
> target.
> 
> Hope it helps.
> 
> 
> =====
> Carles Canellas.
> VicerTec S.L.

[patch] cocoon.xconf and skin

Posted by Carles Canellas <cc...@yahoo.es>.
Hello.
I send you a patch to solve the problem with the skin.
It consist of some changes in the forrest.build.xml
ant file and a file called skin4xconf.xsl, that does
the transformation of the cocoon.xconf. (I have put it
for working in the resources/library/xslt directory,
change the ant file if there's a place better for ti)

I include a solution for anothe bug, in
forrest.build.xml; there was a filtering on in the
project-context target for the skins, including
(that's the error) the skins/images directory, that
could cause errors in the images copied. I have
separated it in two copies, like the bare-context
target.

Hope it helps.


=====
Carles Canellas.
VicerTec S.L.

_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://messenger.yahoo.es

Re: Question. cocoon.xconf and skin

Posted by Jeff Turner <je...@apache.org>.
On Wed, Oct 23, 2002 at 11:46:24AM +0200, Carles Canellas wrote:
> Well, I've got another question about forrest in
> webapps and war, I'm not sure why it works that way.
> 
> When I override the skin to use in the properties
> file, and invoke the ant via forrest script, it's used
> in filters, but in the cocoon.xconf in WEB-INF is not
> changed, so I have to change it manually.

Yes, that's the skin bug we've been discussing recently.  Previously we
had @skin@ tokens in sitemap.xmap, which got replaced by the
'project.skin' property value.  We are trying to move to a better system
where the skin is made available in the sitemap via {defaults:skin}
references (Cocoon input module).  This system currently ignores the
'project.skin' property.  However it allows one thing that the old system
couldn't: in a webapp, you can choose the skin at runtime via the
parameter 'skin=<whatever>'.  Sorry you were caught in the middle of the
change.

> I have seen 4 solutions for that.
> 1: Change it manually, really not the sollution

If you copy the Forrest sitemap
(xml-forrest/src/resources/conf/sitemap.xmap) to your src/documentation/
directory, and replace {defaults:skin} with @skin@, that should fix
things.

> 2: Wait for a dreamware sollution named siteplan
> (well, I don't like to wait)

Nah, this is just a plain ol' screwup, which we'll be making with
siteplans too :)

> 3: Put my own cocoon.xconf in conf subdirectory (If I
> change the skin, I have to change it in two places:
> properties and xconf)

That would work.  Wouldn't need bother with properties.

> 4: put an xslt transformation that changes the skin in
> xconf for the one present as property, in the ant task
> before creating the war and in the one that creates
> the webapp.
> 
> I have chosen the 4th. There's another solution? If
> that solution is OK, I can send the diff's in the
> build and the stylesheet (very simple one)

If it's no trouble that would be great.  It's a nicer workaround than
what I was contemplating (going back to the old system).


--Jeff


> Carles, starting on forrest.
> 
> =====
> Carles Canellas.
> Vicer Tec S.L.