You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Paul Bolger <pb...@gmail.com> on 2005/10/09 02:04:53 UTC

Views

Hi everyone

I'm trying to get Forrest Views to work. Got the plugin and Contracts
list view working but now I'm a bit confused. If I apply a contract
such as the one in the Howto:

<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0">
  <forrest:view type="xhtml">
    <forrest:contract name="content-main"/>
  </forrest:view>
</forrest:views>

I get an 'internal server error'.

But if I use the code from the ls.contracts file:

<forrest:contract name="content-main">
  <forrest:properties contract="content-main">
    <forrest:property name="content-main" nugget="get.body">
      <url>#{$cocoon/parameters/getRequest}.body.xml</url>
    </forrest:property>
  </forrest:properties>
</forrest:contract>

it seems to work. Anyone got any ideas why the first type won't work?


Also, Forrest seems to have slowed down- about 3 seconds to build
index.html in run mode -  and got quite verbose (in the console
window) since I installed views.

Re: Views

Posted by Thorsten Scherler <th...@apache.org>.
El mié, 12-10-2005 a las 22:54 +0930, Paul Bolger escribió: 
> Hi Thorsten
> 
> Sorry haven't got back to you quicker - real work, and life, got in
> the way. I'm not sure how to specify which version of the plugins I'm
> using.

No worries, mate. 

We have 2 versions of views right now. 
1) stable version v1 (codename: views) - working as described by the
howtos
2) dev version v2 (codename: (views-)strucuturer) - not working as
described by the howtos due to changes on way the presentation model get
requested. I will check a refactored version of the structurer (fully
based on lm and jx) now, where I changed the underlying processing (e.g.
there are *no* xincludes anymore and forrest:call-templates is replaced
by <jx:import/>)

> This is the line out of forrest.properties:
> 
> project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer

jeje, like I said before you are using views2 (codename:
(views-)strucuturer). ;-) 
...,org.apache.forrest.plugin.internal.structurer,...

...but *do not* use them in production till I have finished the
refactoring of the themes plugin. I made some changes that I need to
document first. I will announce it to this list. ;-)

> ...and I'm not sure what you mean by jx - is that the
> " Replace lib.core/commons-jxpath-20030909.jar with commons-jxpath-1.2.jar"
> bit?  Should I unreplace it?
> 

a) if you want to see views v2 (codename: (views-)strucuturer) then you
need the commons-jxpath-1.2.jar and the new plugins (see
etc/structurer.sh -> to be committed)
b) if you want to *use* views v1 (codename: views) then not but you
would need to specify the views plugin (see etc/views.sh)

> Since my last Subversion update the previously mentioned forrest
> instance has packed up completely. When I get a bit of time I'll do a
> new one and see what happens.

I will commit today a refactored version of the structurer, 
themes still need to be refactored to use the lm.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Views

Posted by Ross Gardler <rg...@apache.org>.
Paul Bolger wrote:
> I've done a SVN update, done a forrest clean, replaced the
> forrest.properties plugins required line to
> project.required.plugins=org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
> and read the howto again... and I'm now getting this 'internal server
> error' message:
> 
> Request URI
> index.html
> 
> cause
> C:\java\forrest\main\webapp\resources\stylesheets\site2book.xsl (The
> system cannot find the file specified)
> 
> 
> I notice that there is a file 'site-to-book.xsl' at that location.
> Is this a problem with the views plugin, or should I be doing some
> sort of 'plugin flush' to get rid of older versions?

All stylesheets have recently been renamed from *2*.xsl to *-to-*.xsl. 
However, it appears that plugins sitempas have not been moved over to 
theis new format yet. When the move to the locationmap is complete for 
all plugins as well as core sitemaps this will not be a problem (one 
place to change such settings).

There is subtask on FOR-200 (can't provide the full link as JIra is down 
right now). Please feel free to modify the plugin sitemaps and provide a 
patch against that issue.

Thanks.

Ross

Re: Views

Posted by David Crossley <cr...@apache.org>.
Paul Bolger wrote:
> I've done a SVN update, done a forrest clean, replaced the
> forrest.properties plugins required line to
> project.required.plugins=org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
> and read the howto again... and I'm now getting this 'internal server
> error' message:
> 
> Request URI
> index.html
> 
> cause
> C:\java\forrest\main\webapp\resources\stylesheets\site2book.xsl (The
> system cannot find the file specified)
> 
> 
> I notice that there is a file 'site-to-book.xsl' at that location.
> Is this a problem with the views plugin, or should I be doing some
> sort of 'plugin flush' to get rid of older versions?

I presume that you did do:
cd main
./build.sh clean; ./build.sh

That does the "plugin flush".

And then deploy the plugins again.

-David

Re: Views

Posted by Paul Bolger <pb...@gmail.com>.
I've done a SVN update, done a forrest clean, replaced the
forrest.properties plugins required line to
project.required.plugins=org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
and read the howto again... and I'm now getting this 'internal server
error' message:

Request URI
index.html

cause
C:\java\forrest\main\webapp\resources\stylesheets\site2book.xsl (The
system cannot find the file specified)


I notice that there is a file 'site-to-book.xsl' at that location.
Is this a problem with the views plugin, or should I be doing some
sort of 'plugin flush' to get rid of older versions?

By the way: I think putting time into views is well worth it - IMO
fully customisable (and hopefully customisable in fairly basic looking
HTML, which is what views is working towards) HTML output is vital if
Forrest is going to become a mainstream site/doc library building
tool.


On 10/13/05, Thorsten Scherler <th...@apache.org> wrote:
> El jue, 13-10-2005 a las 22:17 +1000, David Crossley escribió:
> ...
> > > > > This is the line out of forrest.properties:
> > > > >
> > > > > project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
> > > >
> > > > That is correct.
> > >
> > > ONLY for the testing version. I do not thing we should recommend them to
> > > use right now. That is the why we rollback the views v1.
> >
> > > > No. But note the bug. I just updated
> > > > http://forrest.apache.org/docs_0_80/howto/howto-view-install.html
> > >
> > > I strongly disagree to change this howtos in anyway related to the new
> > > plugins! We need new howtos for views v2. The old ones that are stable
> > > and can be used in production are best described by this how to.
> >
> > I already updated that document immediately after
> > we changed the development to the new plugins.
>
> Sorry, I missed that.
>
> > Sorry i didn't think clearly enough. Needed quick action.
> > We cannot afford the endless questions about the
> > status of views.
>
> Agree, that was the reason to have 2 new plugins as views v2. I thought
> we declare views v1 as stable and doing further work in the v2. It is
> wee bit like woody and forms.
>
> > So i suppose that we should copy the current document
> > and then revert the old one. I will do that once we
> > settle on a name for views v2.
>
> I already copied them and used structurer as codename. I have not linked
> them yet, so we should agree on the codename and I will update them
> meanwhile.
>
> > This is head of trunk. Be careful about how many
> > backflips we perform to keep people up-to-date
> > with rapidly changing development.
> >
>
> Agreed.
>
> Thanks David.
>
> salu2
> --
> thorsten
>
> "Together we stand, divided we fall!"
> Hey you (Pink Floyd)
>
>


--
Paul Bolger
19 Raggatt St
Alice Springs
NT 0870
08 8953 6780

Re: Views

Posted by Thorsten Scherler <th...@apache.org>.
El jue, 13-10-2005 a las 22:17 +1000, David Crossley escribió:
...
> > > > This is the line out of forrest.properties:
> > > > 
> > > > project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
> > > 
> > > That is correct.
> > 
> > ONLY for the testing version. I do not thing we should recommend them to
> > use right now. That is the why we rollback the views v1.
> 
> > > No. But note the bug. I just updated
> > > http://forrest.apache.org/docs_0_80/howto/howto-view-install.html
> > 
> > I strongly disagree to change this howtos in anyway related to the new
> > plugins! We need new howtos for views v2. The old ones that are stable
> > and can be used in production are best described by this how to.
> 
> I already updated that document immediately after
> we changed the development to the new plugins.

Sorry, I missed that.

> Sorry i didn't think clearly enough. Needed quick action.
> We cannot afford the endless questions about the
> status of views.

Agree, that was the reason to have 2 new plugins as views v2. I thought
we declare views v1 as stable and doing further work in the v2. It is
wee bit like woody and forms.

> So i suppose that we should copy the current document
> and then revert the old one. I will do that once we
> settle on a name for views v2.

I already copied them and used structurer as codename. I have not linked
them yet, so we should agree on the codename and I will update them
meanwhile.

> This is head of trunk. Be careful about how many
> backflips we perform to keep people up-to-date
> with rapidly changing development.
> 

Agreed.

Thanks David.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Views

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley escribi??:
> > Paul Bolger wrote:
> > > Hi Thorsten
> > > 
> > > Sorry haven't got back to you quicker - real work, and life, got in
> > > the way. I'm not sure how to specify which version of the plugins I'm
> > > using.
> > > 
> > > This is the line out of forrest.properties:
> > > 
> > > project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
> > 
> > That is correct.
> 
> ONLY for the testing version. I do not thing we should recommend them to
> use right now. That is the why we rollback the views v1.

> > No. But note the bug. I just updated
> > http://forrest.apache.org/docs_0_80/howto/howto-view-install.html
> 
> I strongly disagree to change this howtos in anyway related to the new
> plugins! We need new howtos for views v2. The old ones that are stable
> and can be used in production are best described by this how to.

I already updated that document immediately after
we changed the development to the new plugins.

Sorry i didn't think clearly enough. Needed quick action.
We cannot afford the endless questions about the
status of views.

So i suppose that we should copy the current document
and then revert the old one. I will do that once we
settle on a name for views v2.

This is head of trunk. Be careful about how many
backflips we perform to keep people up-to-date
with rapidly changing development.

-David

Re: Views

Posted by Thorsten Scherler <th...@apache.org>.
El jue, 13-10-2005 a las 19:29 +1000, David Crossley escribió:
> Paul Bolger wrote:
> > Hi Thorsten
> > 
> > Sorry haven't got back to you quicker - real work, and life, got in
> > the way. I'm not sure how to specify which version of the plugins I'm
> > using.
> > 
> > This is the line out of forrest.properties:
> > 
> > project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
> 
> That is correct.

ONLY for the testing version. I do not thing we should recommend them to
use right now. That is the why we rollback the views v1.

> 
> No. But note the bug. I just updated
> http://forrest.apache.org/docs_0_80/howto/howto-view-install.html
> 

I strongly disagree to change this howtos in anyway related to the new
plugins! We need new howtos for views v2. The old ones that are stable
and can be used in production are best described by this how to.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Views

Posted by David Crossley <cr...@apache.org>.
Paul Bolger wrote:
> Hi Thorsten
> 
> Sorry haven't got back to you quicker - real work, and life, got in
> the way. I'm not sure how to specify which version of the plugins I'm
> using.
> 
> This is the line out of forrest.properties:
> 
> project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer

That is correct.

> ...and I'm not sure what you mean by jx - is that the
> " Replace lib.core/commons-jxpath-20030909.jar with commons-jxpath-1.2.jar"
> bit?

That is correct. Except typo ... lib.core/ => lib/core/

> Should I unreplace it?

No. But note the bug. I just updated
http://forrest.apache.org/docs_0_80/howto/howto-view-install.html

I presume that you have also built and deployed the new plugins,
and done a 'forrest clean' in your project.

-David

Re: Views

Posted by Paul Bolger <pb...@gmail.com>.
Hi Thorsten

Sorry haven't got back to you quicker - real work, and life, got in
the way. I'm not sure how to specify which version of the plugins I'm
using.

This is the line out of forrest.properties:

project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer

...and I'm not sure what you mean by jx - is that the
" Replace lib.core/commons-jxpath-20030909.jar with commons-jxpath-1.2.jar"
bit?  Should I unreplace it?

Since my last Subversion update the previously mentioned forrest
instance has packed up completely. When I get a bit of time I'll do a
new one and see what happens.

pb

On 10/11/05, Thorsten Scherler <th...@apache.org> wrote:
> El lun, 10-10-2005 a las 23:25 +0930, Paul Bolger escribió:
> > Hi Thorsten
> >
> > As you may have guessed I'm a kind of 'paint by numbers' developer.
>
> No worries, good as gold. ;-)
>
> > I've followed the instructions in
> >
> > http://forrest.apache.org/docs_0_80/howto/howto-view-install.html
> >
> > and
> >
> > http://forrest.apache.org/docs_0_80/howto/howto-view-dsl.html
> >
> > until I got to 'Creating your first view' - then things departed from
> > the script. I've got a list of contracts - at "ls.contracts.html" -
> > but haven't encountered anything called a 'themer' yet.
>
> Actually that are 2 new plugins that I am developing as refactoring
> views.
>
> If you followed all the instruction on the above pages this means that
> you should not see the usage of
>
> <forrest:contract name="content-main">
>   <forrest:properties contract="content-main">
>     <forrest:property name="content-main" nugget="get.body">
>       <url>#{$cocoon/parameters/getRequest}.body.xml</url>
>     </forrest:property>
>   </forrest:properties>
> </forrest:contract>
>
> That is *only* working in the
> +
> http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/?rev=312659
> +
> http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/?rev=312659
>
> because the above contract is based on jx. Views in the stable version
> do not support that. Please make sure you are using the latest revision
> for the views plugins, because I rolled them back lately.
>
> To explain: I started to use above contract in views before the
> rollback, but since the rollback you cannot use jx in your templates
> anymore.
>
> Now make as well sure that you do not have this contract in your project
> either.
>
> Please send the line of forrest.properties that state which plugins are
> required and the revision number you use for the plugins. Thx.
>
> HTH
>
> salu2
> --
> thorsten
>
> "Together we stand, divided we fall!"
> Hey you (Pink Floyd)
>
>


--
Paul Bolger
19 Raggatt St
Alice Springs
NT 0870
08 8953 6780

Re: Views

Posted by Thorsten Scherler <th...@apache.org>.
El lun, 10-10-2005 a las 23:25 +0930, Paul Bolger escribió:
> Hi Thorsten
> 
> As you may have guessed I'm a kind of 'paint by numbers' developer.

No worries, good as gold. ;-)

> I've followed the instructions in
> 
> http://forrest.apache.org/docs_0_80/howto/howto-view-install.html
> 
> and
> 
> http://forrest.apache.org/docs_0_80/howto/howto-view-dsl.html
> 
> until I got to 'Creating your first view' - then things departed from
> the script. I've got a list of contracts - at "ls.contracts.html" -
> but haven't encountered anything called a 'themer' yet.

Actually that are 2 new plugins that I am developing as refactoring
views.

If you followed all the instruction on the above pages this means that
you should not see the usage of 

<forrest:contract name="content-main">
  <forrest:properties contract="content-main">
    <forrest:property name="content-main" nugget="get.body">
      <url>#{$cocoon/parameters/getRequest}.body.xml</url>
    </forrest:property>
  </forrest:properties>
</forrest:contract>

That is *only* working in the 
+
http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/?rev=312659
+
http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/?rev=312659

because the above contract is based on jx. Views in the stable version
do not support that. Please make sure you are using the latest revision
for the views plugins, because I rolled them back lately. 

To explain: I started to use above contract in views before the
rollback, but since the rollback you cannot use jx in your templates
anymore. 

Now make as well sure that you do not have this contract in your project
either.

Please send the line of forrest.properties that state which plugins are
required and the revision number you use for the plugins. Thx.

HTH

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Views

Posted by Paul Bolger <pb...@gmail.com>.
Hi Thorsten

As you may have guessed I'm a kind of 'paint by numbers' developer.
I've followed the instructions in

http://forrest.apache.org/docs_0_80/howto/howto-view-install.html

and

http://forrest.apache.org/docs_0_80/howto/howto-view-dsl.html

until I got to 'Creating your first view' - then things departed from
the script. I've got a list of contracts - at "ls.contracts.html" -
but haven't encountered anything called a 'themer' yet.




On 10/10/05, Thorsten Scherler <th...@apache.org> wrote:
> Moved to dev because this thread is about the next generation views
> (themer & structurer) and not the stable once (view & viewHelper).
>
> El dom, 09-10-2005 a las 17:16 +0100, Ross Gardler escribió:
> > Paul Bolger wrote:
> > > I'm trying to get Forrest Views to work. Got the plugin and Contracts
> > > list view working but now I'm a bit confused. If I apply a contract
> > > such as the one in the Howto:
> >
> > Views are part of the 0.8-dev code base. As such all discussion
> > regarding views should take place on the dev list. Please subscribe
> > there and post your question again.
> >
>
> You are not using the viewHelper.xhtml Paul. ;-) You are using the
> themer, which do *only* work with the structurer, jx-1.2 and are not
> doing any link rewritting!
>
> With the current stable viewHelper.xhtml you get:
> <usage><![CDATA[<forrest:contract name="content-main"/>]]></usage>
>
> > We don't want to scare users off with discussion of development code
> > that doesn't work as documented (the code is moving faster than the
> > documents at the moment).
>
> Yes, that is sad but true.
>
> salu2
> --
> thorsten
>
> "Together we stand, divided we fall!"
> Hey you (Pink Floyd)
>
>


--
Paul Bolger
19 Raggatt St
Alice Springs
NT 0870
08 8953 6780

Re: Views

Posted by Thorsten Scherler <th...@apache.org>.
Moved to dev because this thread is about the next generation views
(themer & structurer) and not the stable once (view & viewHelper).

El dom, 09-10-2005 a las 17:16 +0100, Ross Gardler escribió:
> Paul Bolger wrote:
> > I'm trying to get Forrest Views to work. Got the plugin and Contracts
> > list view working but now I'm a bit confused. If I apply a contract
> > such as the one in the Howto:
> 
> Views are part of the 0.8-dev code base. As such all discussion 
> regarding views should take place on the dev list. Please subscribe 
> there and post your question again.
> 

You are not using the viewHelper.xhtml Paul. ;-) You are using the
themer, which do *only* work with the structurer, jx-1.2 and are not
doing any link rewritting! 

With the current stable viewHelper.xhtml you get:
<usage><![CDATA[<forrest:contract name="content-main"/>]]></usage>

> We don't want to scare users off with discussion of development code 
> that doesn't work as documented (the code is moving faster than the 
> documents at the moment).

Yes, that is sad but true.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Views

Posted by Thorsten Scherler <th...@apache.org>.
Moved to dev because this thread is about the next generation views
(themer & structurer) and not the stable once (view & viewHelper).

El dom, 09-10-2005 a las 17:16 +0100, Ross Gardler escribió:
> Paul Bolger wrote:
> > I'm trying to get Forrest Views to work. Got the plugin and Contracts
> > list view working but now I'm a bit confused. If I apply a contract
> > such as the one in the Howto:
> 
> Views are part of the 0.8-dev code base. As such all discussion 
> regarding views should take place on the dev list. Please subscribe 
> there and post your question again.
> 

You are not using the viewHelper.xhtml Paul. ;-) You are using the
themer, which do *only* work with the structurer, jx-1.2 and are not
doing any link rewritting! 

With the current stable viewHelper.xhtml you get:
<usage><![CDATA[<forrest:contract name="content-main"/>]]></usage>

> We don't want to scare users off with discussion of development code 
> that doesn't work as documented (the code is moving faster than the 
> documents at the moment).

Yes, that is sad but true.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Views

Posted by Ross Gardler <rg...@apache.org>.
Paul Bolger wrote:
> I'm trying to get Forrest Views to work. Got the plugin and Contracts
> list view working but now I'm a bit confused. If I apply a contract
> such as the one in the Howto:

Views are part of the 0.8-dev code base. As such all discussion 
regarding views should take place on the dev list. Please subscribe 
there and post your question again.

We don't want to scare users off with discussion of development code 
that doesn't work as documented (the code is moving faster than the 
documents at the moment).

Thanks,
Ross