You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by "Dr. Bhatia Praveen" <pr...@sumpurn.com> on 2009/03/09 11:51:06 UTC

setting userconfig.xml file in output.xmap in a relative path

Hello,
   I am setting the userconfig.xml file in the output.xmap file in 
org.apache.forrest.plugin.output.pdf

  I have done it naively as thus which works but is locked to a specific 
path C:\user\workspace.......:

  <map:components>
    <map:serializers default="fo2pdf">
      <map:serializer name="fo2pdf"
                src="org.apache.cocoon.serialization.FOPSerializer"
                mime-type="application/pdf">
  <!-- PB Added this for fonts like msgothic-->
   <user-config>C:\user\workspace\forrest\src\main\common/userconfig.xml</user-config>
  <!-- PB ended font addition -->
   </map:serializer>
    </map:serializers>
  </map:components>

=======
It works. However, is there a neat way to use properties to write a path 
above so that the path is relative to the forrest workspace?
I tried things like {properties:xdocs} but couldnt make it work....

Praveen


Re: maintaining the non-default locale setting

Posted by Thorsten Scherler <th...@apache.org>.
On Mon, 2009-03-16 at 17:04 +0900, Dr. Bhatia Praveen wrote:
> Hi,
>   How does one maintain a locale setting set by the user?
>   Example:
> 1) Forrest is say set in default English locale
> 2) If we add a clickable option to choose language, say, french (?locale=fr)
> 3) User clicks french. The current page displayed should turn to French
> 4) When he goes to next page that should also be in French (and not English)
> 
> How does one carry this new locale setting by the user to the subsequent 
> pages?
> 
> One of the forrest users website does this, so it is doable! (refer : 
> http://www.verit.de/de/index.html). Can someone let us know how.

Not sure but it seems they are matching the language via the path
(.../de/...). From there you can implement a match in your sitemap that
is doing the rewrite. 

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source <consulting, training and solutions>


maintaining the non-default locale setting

Posted by "Dr. Bhatia Praveen" <pr...@sumpurn.com>.
Hi,
  How does one maintain a locale setting set by the user?
  Example:
1) Forrest is say set in default English locale
2) If we add a clickable option to choose language, say, french (?locale=fr)
3) User clicks french. The current page displayed should turn to French
4) When he goes to next page that should also be in French (and not English)

How does one carry this new locale setting by the user to the subsequent 
pages?

One of the forrest users website does this, so it is doable! (refer : 
http://www.verit.de/de/index.html). Can someone let us know how.

thanks
Praveen


Re: setting userconfig.xml file in output.xmap in a relative path

Posted by Ross Gardler <rg...@apache.org>.
2009/3/9 Dr. Bhatia Praveen <pr...@sumpurn.com>:
> One more question.
> I changed the paths in the forrest executable's plugins.
> Can this be done by user's sitemap.xmap?

I'm not following you here, what are the "paths in the forrest
executable's plugins"?

Ross

>
> Praveen
>
> ----- Original Message ----- From: "Dr. Bhatia Praveen"
> <pr...@sumpurn.com>
> To: <us...@forrest.apache.org>
> Sent: Monday, March 09, 2009 7:51 PM
> Subject: setting userconfig.xml file in output.xmap in a relative path
> - Show quoted text -
>
>
>> Hello,
>>  I am setting the userconfig.xml file in the output.xmap file in
>> org.apache.forrest.plugin.output.pdf
>>
>>  I have done it naively as thus which works but is locked to a specific
>> path C:\user\workspace.......:
>>
>>  <map:components>
>>   <map:serializers default="fo2pdf">
>>     <map:serializer name="fo2pdf"
>>               src="org.apache.cocoon.serialization.FOPSerializer"
>>               mime-type="application/pdf">
>>  <!-- PB Added this for fonts like msgothic-->
>>
>>
>> <user-config>C:\user\workspace\forrest\src\main\common/userconfig.xml</user-config>
>>  <!-- PB ended font addition -->
>>  </map:serializer>
>>   </map:serializers>
>>  </map:components>
>>
>> =======
>> It works. However, is there a neat way to use properties to write a path
>> above so that the path is relative to the forrest workspace?
>> I tried things like {properties:xdocs} but couldnt make it work....
>>
>> Praveen
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.237 / Virus Database: 270.11.9/1990 - Release Date: 03/08/09
> 17:17:00
>
>



-- 
--
Ross Gardler

OSS Watch - awareness and understanding of open source software
development and use in education
http://www.oss-watch.ac.uk

Re: setting userconfig.xml file in output.xmap in a relative path

Posted by Sjur Moshagen <sj...@mac.com>.
Which version of Forrest are you using? A lot of work went into the  
pdf output plugin last fall, to make it fully user configurable  
without touching Forrest itself. So the answer to your question  
depends on the version you are using.

Best regards
Sjur

Den 9. mar. 2009 kl. 13.02 skrev Dr. Bhatia Praveen:

> One more question.
> I changed the paths in the forrest executable's plugins.
> Can this be done by user's sitemap.xmap?
>
> Praveen
>
> ----- Original Message ----- From: "Dr. Bhatia Praveen" <praveen.bhatia@sumpurn.com 
> >
> To: <us...@forrest.apache.org>
> Sent: Monday, March 09, 2009 7:51 PM
> Subject: setting userconfig.xml file in output.xmap in a relative path
>
>
>> Hello,
>>  I am setting the userconfig.xml file in the output.xmap file in
>> org.apache.forrest.plugin.output.pdf
>>
>> I have done it naively as thus which works but is locked to a  
>> specific
>> path C:\user\workspace.......:
>>
>> <map:components>
>>   <map:serializers default="fo2pdf">
>>     <map:serializer name="fo2pdf"
>>               src="org.apache.cocoon.serialization.FOPSerializer"
>>               mime-type="application/pdf">
>> <!-- PB Added this for fonts like msgothic-->
>> <user-config>C:\user\workspace\forrest\src\main\common/ 
>> userconfig.xml</user-config>
>> <!-- PB ended font addition -->
>>  </map:serializer>
>>   </map:serializers>
>> </map:components>
>>
>> =======
>> It works. However, is there a neat way to use properties to write a  
>> path
>> above so that the path is relative to the forrest workspace?
>> I tried things like {properties:xdocs} but couldnt make it work....
>>
>> Praveen
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.237 / Virus Database: 270.11.9/1990 - Release Date:  
> 03/08/09 17:17:00
>


Re: setting userconfig.xml file in output.xmap in a relative path

Posted by "Dr. Bhatia Praveen" <pr...@sumpurn.com>.
One more question.
I changed the paths in the forrest executable's plugins.
Can this be done by user's sitemap.xmap?

Praveen

----- Original Message ----- 
From: "Dr. Bhatia Praveen" <pr...@sumpurn.com>
To: <us...@forrest.apache.org>
Sent: Monday, March 09, 2009 7:51 PM
Subject: setting userconfig.xml file in output.xmap in a relative path


> Hello,
>   I am setting the userconfig.xml file in the output.xmap file in
> org.apache.forrest.plugin.output.pdf
>
>  I have done it naively as thus which works but is locked to a specific
> path C:\user\workspace.......:
>
>  <map:components>
>    <map:serializers default="fo2pdf">
>      <map:serializer name="fo2pdf"
>                src="org.apache.cocoon.serialization.FOPSerializer"
>                mime-type="application/pdf">
>  <!-- PB Added this for fonts like msgothic-->
> 
> <user-config>C:\user\workspace\forrest\src\main\common/userconfig.xml</user-config>
>  <!-- PB ended font addition -->
>   </map:serializer>
>    </map:serializers>
>  </map:components>
>
> =======
> It works. However, is there a neat way to use properties to write a path
> above so that the path is relative to the forrest workspace?
> I tried things like {properties:xdocs} but couldnt make it work....
>
> Praveen
>
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.11.9/1990 - Release Date: 03/08/09 
17:17:00


Re: setting userconfig.xml file in output.xmap in a relative path

Posted by David Crossley <cr...@apache.org>.
Sjur Moshagen wrote:
> skrev Dr. Bhatia Praveen:
> >
> >Hi Sjur/Ross,
> > I am using version 0.8 version of forrest.
> 
> Ok. I would recommend you to update to the svn trunk version of  
> Forrest to get proper configurability of the pdf output plugin in  
> Forrest.

Thanks for your answers Sjur. However, we can only
discuss *released* versions on this "user" mail list.

Development versions on the "dev" mail list.

-David

> > I changed the output.xmap in the installation of forrest 0.8 ie
> >C:\user\Installation\forrest\apache-forrest-0.8\plugins 
> >\org.apache.forrest.plugin.output.pdf
> >
> >This means that when I change computers/forrest versions, the  
> >application again doesnt work unless I remember to go and chande the  
> >installation plugins file.
> 
> Yes, this is the problem targeted in the work on the pdf plugin lately.
> 
> >So I am looking for a general way (for example in user's  
> >sitemap.xmap) where this setting could be done with properties and  
> >so application could move accross computers/higher versions.
> 
> In the current svn trunk version of Forrest (0.9-dev), this is solved.  
> As Ross pointed out, the new ways of configuring the pdf output isn't  
> very well documented, but the information is available in the mail  
> archive.
> 
> Also, the current trunk uses a much improved FOP version, which in  
> itself has made user configurations easier.
> 
> >In earlier version of Forrest it could be done by editing the fo2pdf  
> >pipeline in the sitemap.xmap of the user.
> 
> This is not supported anymore, but using the Locationmap feature, it  
> is easy to override specific processing steps as part of the user  
> configuration.
> 
> What kind of changes would you like to have?
> 
> Best regards,
> Sjur
> 

Re: setting userconfig.xml file in output.xmap in a relative path

Posted by Sjur Moshagen <sj...@mac.com>.
Den 9. mar. 2009 kl. 13.40 skrev Dr. Bhatia Praveen:

> Hi Sjur/Ross,
>  I am using version 0.8 version of forrest.

Ok. I would recommend you to update to the svn trunk version of  
Forrest to get proper configurability of the pdf output plugin in  
Forrest.

>  I changed the output.xmap in the installation of forrest 0.8 ie
> C:\user\Installation\forrest\apache-forrest-0.8\plugins 
> \org.apache.forrest.plugin.output.pdf
>
> This means that when I change computers/forrest versions, the  
> application again doesnt work unless I remember to go and chande the  
> installation plugins file.

Yes, this is the problem targeted in the work on the pdf plugin lately.

> So I am looking for a general way (for example in user's  
> sitemap.xmap) where this setting could be done with properties and  
> so application could move accross computers/higher versions.

In the current svn trunk version of Forrest (0.9-dev), this is solved.  
As Ross pointed out, the new ways of configuring the pdf output isn't  
very well documented, but the information is available in the mail  
archive.

Also, the current trunk uses a much improved FOP version, which in  
itself has made user configurations easier.

> In earlier version of Forrest it could be done by editing the fo2pdf  
> pipeline in the sitemap.xmap of the user.

This is not supported anymore, but using the Locationmap feature, it  
is easy to override specific processing steps as part of the user  
configuration.

What kind of changes would you like to have?

Best regards,
Sjur


Re: setting userconfig.xml file in output.xmap in a relative path

Posted by "Dr. Bhatia Praveen" <pr...@sumpurn.com>.
Hi Sjur/Ross,
   I am using version 0.8 version of forrest.
   I changed the output.xmap in the installation of forrest 0.8 ie
C:\user\Installation\forrest\apache-forrest-0.8\plugins\org.apache.forrest.plugin.output.pdf

This means that when I change computers/forrest versions, the application 
again doesnt work unless I remember to go and chande the installation 
plugins file.
So I am looking for a general way (for example in user's sitemap.xmap) where 
this setting could be done with properties and so application could move 
accross computers/higher versions.

 In earlier version of Forrest it could be done by editing the fo2pdf 
pipeline in the sitemap.xmap of the user.

Thanks
Praveen

----- Original Message ----- 
From: "Ross Gardler" <rg...@apache.org>
To: <us...@forrest.apache.org>; "Dr. Bhatia Praveen" 
<pr...@sumpurn.com>
Sent: Monday, March 09, 2009 8:26 PM
Subject: Re: setting userconfig.xml file in output.xmap in a relative path


2009/3/9 Dr. Bhatia Praveen <pr...@sumpurn.com>:
> Hello,
> I am setting the userconfig.xml file in the output.xmap file in
> org.apache.forrest.plugin.output.pdf
>
> I have done it naively as thus which works but is locked to a specific 
> path
> C:\user\workspace.......:
>
> <map:components>
> <map:serializers default="fo2pdf">
> <map:serializer name="fo2pdf"
> src="org.apache.cocoon.serialization.FOPSerializer"
> mime-type="application/pdf">
> <!-- PB Added this for fonts like msgothic-->
> <user-config>C:\user\workspace\forrest\src\main\common/userconfig.xml</user-config>
> <!-- PB ended font addition -->
> </map:serializer>
> </map:serializers>
> </map:components>
>
> =======
> It works. However, is there a neat way to use properties to write a path
> above so that the path is relative to the forrest workspace?
> I tried things like {properties:xdocs} but couldnt make it work....

You are using 0.9 right?

If so there is a new properties system, unfortunately it is not well
documented but you can see notes in

https://issues.apache.org/jira/browse/FOR-588

In particular the sub issue
https://issues.apache.org/jira/browse/FOR-734 links to the thread
http://marc.info/?l=forrest-dev&m=114170683324461&w=2 which tells you
how to do this in a scalable way.

As ever, pulling that out into a patch for our documentation would be
really helpful (don't worry about perfect, anything that is not hidded
in the issue tracker is an improvement).

Ross



-- 
--
Ross Gardler

OSS Watch - awareness and understanding of open source software
development and use in education
http://www.oss-watch.ac.uk



--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.11.9/1990 - Release Date: 03/08/09 
17:17:00


Re: setting userconfig.xml file in output.xmap in a relative path

Posted by Ross Gardler <rg...@apache.org>.
2009/3/9 Dr. Bhatia Praveen <pr...@sumpurn.com>:
> Hello,
>  I am setting the userconfig.xml file in the output.xmap file in
> org.apache.forrest.plugin.output.pdf
>
>  I have done it naively as thus which works but is locked to a specific path
> C:\user\workspace.......:
>
>  <map:components>
>   <map:serializers default="fo2pdf">
>     <map:serializer name="fo2pdf"
>               src="org.apache.cocoon.serialization.FOPSerializer"
>               mime-type="application/pdf">
>  <!-- PB Added this for fonts like msgothic-->
>  <user-config>C:\user\workspace\forrest\src\main\common/userconfig.xml</user-config>
>  <!-- PB ended font addition -->
>  </map:serializer>
>   </map:serializers>
>  </map:components>
>
> =======
> It works. However, is there a neat way to use properties to write a path
> above so that the path is relative to the forrest workspace?
> I tried things like {properties:xdocs} but couldnt make it work....

You are using 0.9 right?

If so there is a new properties system, unfortunately it is not well
documented but you can see notes in

https://issues.apache.org/jira/browse/FOR-588

In particular the sub issue
https://issues.apache.org/jira/browse/FOR-734 links to the thread
http://marc.info/?l=forrest-dev&m=114170683324461&w=2 which tells you
how to do this in a scalable way.

As ever, pulling that out into a patch for our documentation would be
really helpful (don't worry about perfect, anything that is not hidded
in the issue tracker is an improvement).

Ross



-- 
--
Ross Gardler

OSS Watch - awareness and understanding of open source software
development and use in education
http://www.oss-watch.ac.uk