You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Bruno Dumon <br...@outerthought.org> on 2006/02/28 20:51:01 UTC

Patch for daisy-to-html.xsl (forrest daisy plugin)

Hi,

In Daisy 1.5 (currently in development), there is a small change in the
publisher output format. I have attached a patch which adjusts the
daisy-to-html.xsl of Forrest to support both the old and new format.

The change is that now a new publisher request is executed for each
prepared document, causing a move of

p:preparedDocuments/p:preparedDocument/d:document
to
p:preparedDocuments/p:preparedDocument/p:publisherResponse/d:document

It is easy to support either format simply by testing for the existence
of the d:document, as I've done in the attached patch.

I did not try this patch by running Forrest, but tried it from the
command line with the old and new input and it seems to work just fine.

                               - o -

I'm interested in seeing this applied to Forrest as Cocoon's
documentation is published via Forrest from Daisy, and I'd like to
update Cocoon's Daisy instance to a new release soon. Therefore, I'd
also like to request if someone could look into updating that file on
the Forrest zone.

Thanks in advance,

Bruno.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org

Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Juan Jose Pablos wrote:
> 
>>>I'm interested in seeing this applied to Forrest as Cocoon's
>>>documentation is published via Forrest from Daisy, and I'd like to
>>>update Cocoon's Daisy instance to a new release soon. Therefore, I'd
>>>also like to request if someone could look into updating that file on
>>>the Forrest zone.
>>
>>Done
> 
> 
> Thanks. Cheche has added it to the Forrest trunk SVN.
> 
> We need to also deploy the plugin so that the forrestbot
> at forrest.zones.apache.org can use it.


No we don't. A while bak I made it so that dev plugins will be copied 
from the src tree if possible. See the commit messages at 
http://issues.apache.org/jira/browse/FOR-388?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel

> $FORREST_HOME/tools/ant/bin/ant deploy
> 
> Uh'oh. That does a test build with the Daisy plugin
> which fails with ...
> ...
> * [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
> X [0] cocoon/index.html BROKEN: Unable to get attribute value for daisy.navigation.docID
> ...
> 
> Sorry i don't know what that means. Bruno's patch
> is related to Daisy IDs.

This is nothing to do with the patch Bruno suplied. It is because the 
property daisy.navigation.docID has not been defined in 
forrest.properties.xml

I'll raise an issue.

> So until we fix this (and another error) we cannot deploy
> the Daisy plugin.

But

> 
> -David
> 
> 


Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> David Crossley wrote:

...

>  > * [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
>  > X [0] cocoon/index.html BROKEN: Unable to get attribute value for 
> daisy.navigation.docID
>  > ...
>  >
>  > Sorry i don't know what that means. Bruno's patch
>  > is related to Daisy IDs.
> 
> This is nothing to do with the patch Bruno suplied. It is because the 
> property daisy.navigation.docID has not been defined in 
> forrest.properties.xml
> 
> I'll raise an issue.

It was almost as fast to fix as to raise an issue. I added some 
placeholders in default.forrest.properties.xml with "descriptive" values.

Now the above error will tell the user how to fix it (i.e. add a 
definition of the property to forrest.properties.xml

I also added the details for the Cocoon daisy instance so we can build 
the plugin docs.

However, the build is still failing for me due to no pipeline matching 
"favicon.ico". No time to look into this just now, and I've not tested 
to see if it is an issue with the Daisy plugin or with Forrest as a whole.

Ross

Re: procedure when patching plugins

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> 
>>David Crossley wrote:
>>
>>>Juan Jose Pablos wrote:
>>>
>>>
>>>>>I'm interested in seeing this applied to Forrest as Cocoon's
>>>>>documentation is published via Forrest from Daisy, and I'd like to
>>>>>update Cocoon's Daisy instance to a new release soon. Therefore, I'd
>>>>>also like to request if someone could look into updating that file on
>>>>>the Forrest zone.
>>>>
>>>>Done
>>>
>>>Thanks. Cheche has added it to the Forrest trunk SVN.
>>>
>>>We need to also deploy the plugin so that the forrestbot
>>>at forrest.zones.apache.org can use it.
>>
>>No we don't. A while bak I made it so that dev plugins will be copied 
>>from the src tree if possible. See the commit messages at 
>>http://issues.apache.org/jira/browse/FOR-388?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel
> 
> 
> Gak, i wondered about that. Sorry to spread
> that mis-information.
> 

...

> We do need to enhance our Howto build plugin docs,
> or we each need to re-read them or something. [1]

Quite right, if I'd update the docs you would probably not have missed 
the improvement. I think the reason I didn't update the docs was because 
this is a "half way" solution to true in-place use of plugins. I 
intended to finish the job, but other things have got in the way since. 
Probably best to update docs now, no idea when I'll get time to finish this.

>>>$FORREST_HOME/tools/ant/bin/ant deploy
>>>
>>>Uh'oh. That does a test build with the Daisy plugin
>>>which fails with ...
>>>...
>>>* [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
>>>X [0] cocoon/index.html BROKEN: Unable to get attribute value for 
>>
>>daisy.navigation.docID
>>

...

>>This is nothing to do with the patch Bruno suplied. It is because the 
>>property daisy.navigation.docID has not been defined in 
>>forrest.properties.xml

...

> So perhaps this was already failing before the patch.

Yes, it will have been. It is fixed in SVN now.

> Is "local-deploy" necessary now? Yes, see Ross'
> comments at the FOR-388 commit messages.

Yes, to recap:

- if the plugin is not present in the forrest/build directory then it 
will be locally deployed during "forrest run" (need to test for forrest 
war, but it should work for that too).

- if the plugin is then edited and you want to see the results you still 
need to do a local-deploy to copy the edits to the running instance

FOR-388 is about true in-place use of plugin srcs. I implemented the 
above to:

a) ensure the forrestbot was using the latest dev version (integration 
testing)

b) prevent the need to locally deploy plugins after a "build.sh clean"

> At what stage do committers do "deploy" and why?

deploy puts a development copy of the plugin on the distibution server. 
This means that users who are using the dev version of a plugin will get 
the new changes without having to update to SVN head.

Therefore deploy target should only be run when we are sure that the 
plugin works correctly. This is why it druns the "test" task efore 
deployment.

There is also the release target which will also upload a versioned copy 
of the plugin to the server.

Ross


> [1] http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html

procedure when patching plugins

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> David Crossley wrote:
> > Juan Jose Pablos wrote:
> >
> >>>I'm interested in seeing this applied to Forrest as Cocoon's
> >>>documentation is published via Forrest from Daisy, and I'd like to
> >>>update Cocoon's Daisy instance to a new release soon. Therefore, I'd
> >>>also like to request if someone could look into updating that file on
> >>>the Forrest zone.
> >>
> >>Done
> >
> > Thanks. Cheche has added it to the Forrest trunk SVN.
> >
> > We need to also deploy the plugin so that the forrestbot
> > at forrest.zones.apache.org can use it.
> 
> No we don't. A while bak I made it so that dev plugins will be copied 
> from the src tree if possible. See the commit messages at 
> http://issues.apache.org/jira/browse/FOR-388?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel

Gak, i wondered about that. Sorry to spread
that mis-information.

Actually i was confused by local behaviour. I am
only doing 'build clean' when necessary. Forrestbot
on the zone is cleaning every hour, so  it gets the
new plugin by itself. Nice.

We do need to enhance our Howto build plugin docs,
or we each need to re-read them or something. [1]

> > $FORREST_HOME/tools/ant/bin/ant deploy
> >
> > Uh'oh. That does a test build with the Daisy plugin
> > which fails with ...
> > ...
> > * [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
> > X [0] cocoon/index.html BROKEN: Unable to get attribute value for 
> daisy.navigation.docID
> > ...
> >
> > Sorry i don't know what that means. Bruno's patch
> > is related to Daisy IDs.
> 
> This is nothing to do with the patch Bruno suplied. It is because the 
> property daisy.navigation.docID has not been defined in 
> forrest.properties.xml
>
> I'll raise an issue.

So perhaps this was already failing before the patch.

We need to follow a procedure when patching plugins:
Do '$FORREST_HOME/tools/ant/bin/ant test' beforehand.
Apply the patch.
Do '$FORREST_HOME/tools/ant/bin/ant test' again.

Is "local-deploy" necessary now? Yes, see Ross'
comments at the FOR-388 commit messages.

At what stage do committers do "deploy" and why?

[1] http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html

-David

> > So until we fix this (and another error) we cannot deploy
> > the Daisy plugin.
> 
> See above, no problem. It should still work, so Bruno can go ahead and 
> update the Cocoon Daisy instance. The forrestbot will tell us if there 
> is a problem. I can't see any issues wth the patch.
> 
> Ross

Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
 > Juan Jose Pablos wrote:
 >
 >>>I'm interested in seeing this applied to Forrest as Cocoon's
 >>>documentation is published via Forrest from Daisy, and I'd like to
 >>>update Cocoon's Daisy instance to a new release soon. Therefore, I'd
 >>>also like to request if someone could look into updating that file on
 >>>the Forrest zone.
 >>
 >>Done
 >
 >
 > Thanks. Cheche has added it to the Forrest trunk SVN.
 >
 > We need to also deploy the plugin so that the forrestbot
 > at forrest.zones.apache.org can use it.


No we don't. A while bak I made it so that dev plugins will be copied 
from the src tree if possible. See the commit messages at 
http://issues.apache.org/jira/browse/FOR-388?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel

 > $FORREST_HOME/tools/ant/bin/ant deploy
 >
 > Uh'oh. That does a test build with the Daisy plugin
 > which fails with ...
 > ...
 > * [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
 > X [0] cocoon/index.html BROKEN: Unable to get attribute value for 
daisy.navigation.docID
 > ...
 >
 > Sorry i don't know what that means. Bruno's patch
 > is related to Daisy IDs.

This is nothing to do with the patch Bruno suplied. It is because the 
property daisy.navigation.docID has not been defined in 
forrest.properties.xml

I'll raise an issue.

 > So until we fix this (and another error) we cannot deploy
 > the Daisy plugin.

See above, no problem. It should still work, so Bruno can go ahead and 
update the Cocoon Daisy instance. The forrestbot will tell us if there 
is a problem. I can't see any issues wth the patch.

Ross

Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Bruno Dumon <br...@outerthought.org>.
On Wed, 2006-03-01 at 10:11 +0000, Ross Gardler wrote:
> Bruno Dumon wrote:
> > On Wed, 2006-03-01 at 15:58 +1100, David Crossley wrote:
> 
> ...
> 
> >>So until we fix this (and another error) we cannot deploy
> >>the Daisy plugin.
> > 
> > 
> > No problem. Thanks for the quick follow-up.
> > 
> 
> Just to make sure you see the comment from prvious mail in this thread.
> 
> You can go ahead and upgrade the Cocoon instance, evertything should 
> work. If it breaks the forrestbot will tell us and I will fix it.

ok, thanks. I'll probably do the upgrade in or around the weekend, I'll
give a warning upfront on dev@cocoon.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Ross Gardler <rg...@apache.org>.
Bruno Dumon wrote:
> On Wed, 2006-03-01 at 15:58 +1100, David Crossley wrote:

...

>>So until we fix this (and another error) we cannot deploy
>>the Daisy plugin.
> 
> 
> No problem. Thanks for the quick follow-up.
> 

Just to make sure you see the comment from prvious mail in this thread.

You can go ahead and upgrade the Cocoon instance, evertything should 
work. If it breaks the forrestbot will tell us and I will fix it.

Thanks for you patch.

Ross

Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Bruno Dumon <br...@outerthought.org>.
On Wed, 2006-03-01 at 15:58 +1100, David Crossley wrote:
> Juan Jose Pablos wrote:
> > >I'm interested in seeing this applied to Forrest as Cocoon's
> > >documentation is published via Forrest from Daisy, and I'd like to
> > >update Cocoon's Daisy instance to a new release soon. Therefore, I'd
> > >also like to request if someone could look into updating that file on
> > >the Forrest zone.
> > 
> > Done
> 
> Thanks. Cheche has added it to the Forrest trunk SVN.
> 
> We need to also deploy the plugin so that the forrestbot
> at forrest.zones.apache.org can use it.
> 
> $FORREST_HOME/tools/ant/bin/ant deploy
> 
> Uh'oh. That does a test build with the Daisy plugin
> which fails with ...
> ...
> * [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
> X [0] cocoon/index.html BROKEN: Unable to get attribute value for daisy.navigation.docID
> ...
> 
> Sorry i don't know what that means.

Me neither.

>  Bruno's patch
> is related to Daisy IDs.

I don't think it's related, it more seems like some configuration of the
plugin is missing. Ross can probably easily tell what's going on, so
I'll wait till he has some time.

> 
> So until we fix this (and another error) we cannot deploy
> the Daisy plugin.

No problem. Thanks for the quick follow-up.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by David Crossley <cr...@apache.org>.
Juan Jose Pablos wrote:
> >I'm interested in seeing this applied to Forrest as Cocoon's
> >documentation is published via Forrest from Daisy, and I'd like to
> >update Cocoon's Daisy instance to a new release soon. Therefore, I'd
> >also like to request if someone could look into updating that file on
> >the Forrest zone.
> 
> Done

Thanks. Cheche has added it to the Forrest trunk SVN.

We need to also deploy the plugin so that the forrestbot
at forrest.zones.apache.org can use it.

$FORREST_HOME/tools/ant/bin/ant deploy

Uh'oh. That does a test build with the Daisy plugin
which fails with ...
...
* [1/16]    [16/16]   5.68s  5.5Kb   linkmap.html
X [0] cocoon/index.html BROKEN: Unable to get attribute value for daisy.navigation.docID
...

Sorry i don't know what that means. Bruno's patch
is related to Daisy IDs.

So until we fix this (and another error) we cannot deploy
the Daisy plugin.

-David

Re: Patch for daisy-to-html.xsl (forrest daisy plugin)

Posted by Juan Jose Pablos <ch...@apache.org>.
> I'm interested in seeing this applied to Forrest as Cocoon's
> documentation is published via Forrest from Daisy, and I'd like to
> update Cocoon's Daisy instance to a new release soon. Therefore, I'd
> also like to request if someone could look into updating that file on
> the Forrest zone.


Done