Re: use of variables on XSL

2005-01-19 Thread Thorsten Scherler
Antonio Gallardo escribió:
(BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) )
  Yes, this no me friegues sounds like Nicaraguan spanish!!!  Your
friend
Thorsten told me about it, and we allways are saying it!!

lol. :-DD
Best Regards,
Antonio Gallardo.
:)
You are world famous in spain and No me friegues at least now in 
Sevilla. :)

Greetings from the pollo raro and me.
--
thorsten
Together we stand, divided we fall
Hey you (Pink Floyd)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Portal]- using form and trying to access DB (esql)

2005-01-19 Thread José Ferreiro - TSSAG








Hello,



Did someone
do the following:

Creating a
form and introducing it into a coplet in the portal engine.

When the
user submit the form a xsp file is called and esql code is executed.



I developped
successfully the form and the db interaction.

But when I put
it into the coplet as explained in 



http://cocoon.apache.org/2.1/developing/portal/forms.html



and then I
submit the form there is no answer from the db. ?



Is it a bug?



Thanks for
your comments and advices



   /JF








Re: use of variables on XSL

2005-01-19 Thread Antonio Gallardo
On Mie, 19 de Enero de 2005, 2:33, Thorsten Scherler dijo:
 Antonio Gallardo escribió:

(BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-)
 )

   Yes, this no me friegues sounds like Nicaraguan spanish!!!  Your
friend
Thorsten told me about it, and we allways are saying it!!


 lol. :-DD

 Best Regards,

 Antonio Gallardo.

 :)

 You are world famous in spain and No me friegues at least now in
 Sevilla. :)

Sounds like you are teaching spanish there. ;-)

That is cool, DUDE! :-DD


 Greetings from the pollo raro and me.

Many Thanks and plase send him my greetings too! :-)

Best Regards,

Antonio Gallardo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cocoon with Virtual Hosts (apache/tomcat)

2005-01-19 Thread Derek Hohls
I am working with Apache/Tomcat and Cocoon 2.1.5. 
I am trying to have a virtual host setup, so users from
outside the organisation can access the site.


In the Apache httpd.conf file, the Unix admin has inserted
(note that I have changed some actual parameters for security...)
the following (NB: I have been told that the warp connnector
option *cannot* be setup... we need to use a proxy rewrite)

VirtualHost 0.0.0.0
ServerAdmin [EMAIL PROTECTED] 
ServerName soc.myserver.com:80
DocumentRoot /usr/local/tomcat/webapps

RewriteEngine   on
# If URL has cocoon215/soc(/) we don't rewrite, therefore Last rule
RewriteRule ^/cocoon215/soc/(.*)  /cocoon215/soc/$1 [R,L]
RewriteRule ^/cocoon215/soc$ /cocoon215/soc [R,L]
# Else we must rewrite
#RewriteRule ^/$/cocoon215/soc [R,L]
RewriteRule ^/(.*)/cocoon215/soc/$1 [R,L]
# We reverse proxy instead of Warp connector 
ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
ProxyPassReverse /cocoon215/soc http://localhost:8080/cocoon215/soc 
/VirtualHost


In my sitemap I have:

map:match pattern=pageTest
  map:generate src=docs/test.xml/
  map:transform src=stylesheets/doc/test-page2html.xsl
   map:parameter name=use-request-parameters value=true/
   map:parameter name=contextPath value={request:contextPath}/
   map:parameter name=servletPath value={request:servletPath}/
   map:parameter name=serverName value={request:serverName}/
   map:parameter name=serverPort value={request:serverPort}/

  /map:transform
  map:serialize/  
/map:match 


In the stylesheet (test-page2html.xsl) I have:

xsl:param name=contextPath/
xsl:param name=servletPath/
xsl:param name=serverName/
xsl:param name=serverPort/
...
pContext=xsl:value-of select=$contextPath//p
pServlet=xsl:value-of select=$servletPath//p
pServer=xsl:value-of select=$serverName//p
pPort=xsl:value-of select=$serverPort//p


But, whether I try 
http://myserver.com:8080/cocoon215/soc/pageTest 
or
http://soc.myserver.com/cocoon215/soc/pageTest 

I have the same results:

Context=/cocoon215
Servlet=/soc/pageTest
Server=myserver.com
Port=8080


In order for the application to work properly, 
what do I need to do to get to this:

Context=/cocoon215
Servlet=/soc/pageTest
Server=soc.myserver.com
Port=[null]

Any ideas how?

Thanks
Derek



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon Forms - how to add a confirmation dialog on submit

2005-01-19 Thread Vilya Harvey
Hank Heidt wrote:
Can any of you recommend a good way or point me to an example of how to
add a confirmation dialog, i.e., Are you sure that you want to save the
changes? to the standard Cocoon Forms submit widget? 

I looked around and didn't see anything obvious - my hope is that there
is an easy way to do this...
 

Try this:
   ft:widget id=mySubmitWidget
  fi:styling onclick=return confirm('Are you sure you want to 
save your changes?')/
   /ft:widget

Any attributes of the fi:styling element which aren't explicitly 
handled by the forms XSL are copied on to the output element for the 
widget. That includes all of the standard HTML event handler attributes, 
so you can easily attach client-side JavaScript to your widgets.

Hope that helps,
Vil.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cocoon with Virtual Hosts (apache/tomcat)

2005-01-19 Thread Derek Hohls
Upayavira

Apparently that was tried as well  the problem in that
case is that the :8080 is still retained in the response 
coming back from the ProxyPassReverse and so the 
site is then effectively not viewable from outside the local
network.

Any other ideas?

Derek


 [EMAIL PROTECTED] 2005/01/19 11:55:18 AM 
Derek Hohls wrote:

I am working with Apache/Tomcat and Cocoon 2.1.5. 
I am trying to have a virtual host setup, so users from
outside the organisation can access the site.


In the Apache httpd.conf file, the Unix admin has inserted
(note that I have changed some actual parameters for security...)
the following (NB: I have been told that the warp connnector
option *cannot* be setup... we need to use a proxy rewrite)

VirtualHost 0.0.0.0
ServerAdmin [EMAIL PROTECTED] 
ServerName soc.myserver.com:80
DocumentRoot /usr/local/tomcat/webapps

RewriteEngine   on
# If URL has cocoon215/soc(/) we don't rewrite, therefore Last rule
RewriteRule ^/cocoon215/soc/(.*)  /cocoon215/soc/$1 [R,L]
RewriteRule ^/cocoon215/soc$ /cocoon215/soc [R,L]
# Else we must rewrite
#RewriteRule ^/$/cocoon215/soc [R,L]
RewriteRule ^/(.*)/cocoon215/soc/$1 [R,L]
# We reverse proxy instead of Warp connector 
ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
ProxyPassReverse /cocoon215/soc http://localhost:8080/cocoon215/soc 
/VirtualHost


In my sitemap I have:

map:match pattern=pageTest
  map:generate src=docs/test.xml/
  map:transform src=stylesheets/doc/test-page2html.xsl
   map:parameter name=use-request-parameters value=true/
   map:parameter name=contextPath value={request:contextPath}/
   map:parameter name=servletPath value={request:servletPath}/
   map:parameter name=serverName value={request:serverName}/
   map:parameter name=serverPort value={request:serverPort}/   


  /map:transform
  map:serialize/  
/map:match 


In the stylesheet (test-page2html.xsl) I have:

xsl:param name=contextPath/
xsl:param name=servletPath/
xsl:param name=serverName/
xsl:param name=serverPort/
...
pContext=xsl:value-of select=$contextPath//p
pServlet=xsl:value-of select=$servletPath//p
pServer=xsl:value-of select=$serverName//p
pPort=xsl:value-of select=$serverPort//p


But, whether I try 
http://myserver.com:8080/cocoon215/soc/pageTest 
or
http://soc.myserver.com/cocoon215/soc/pageTest 

I have the same results:

Context=/cocoon215
Servlet=/soc/pageTest
Server=myserver.com
Port=8080


In order for the application to work properly, 
what do I need to do to get to this:

Context=/cocoon215
Servlet=/soc/pageTest
Server=soc.myserver.com
Port=[null]

Any ideas how?
  

Cocoon will see the hostname as being the one supplied from Apache. You

have:

ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
ProxyPassReverse /cocoon215/soc http://localhost:8080/cocoon215/soc 

So Cocoon should see localhost. You could replace this with
soc.myserver.com. If that points to an external IP address, add:
127.0.0.1  soc.myserver.com
to your /etc/hosts file.

Make sense?

Regards, Upayavira




-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PDF with Adobe Reader 7 - Too many arguments

2005-01-19 Thread Matthew Langham
We are the same problems outlined in this post to the FOP mailing-list:
http://marc.theaimsgroup.com/?l=fop-userm=110554914401671w=2
Does anyone know of a solution?
Thanks
Matthew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cocoon with Virtual Hosts (apache/tomcat)

2005-01-19 Thread Upayavira
Instead of:
ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
you should use:
RewriteRule /cocoon215/soc(.*) http://localhost:8080/cocoon215/soc$1

You should still use the ProxyPassReverse rule.
Try that.
Regards, Upayavira

Derek Hohls wrote:
Upayavira
Apparently that was tried as well  the problem in that
case is that the :8080 is still retained in the response 
coming back from the ProxyPassReverse and so the 
site is then effectively not viewable from outside the local
network.

Any other ideas?
Derek

[EMAIL PROTECTED] 2005/01/19 11:55:18 AM 
Derek Hohls wrote:

I am working with Apache/Tomcat and Cocoon 2.1.5. 
I am trying to have a virtual host setup, so users from
outside the organisation can access the site.

In the Apache httpd.conf file, the Unix admin has inserted
(note that I have changed some actual parameters for security...)
the following (NB: I have been told that the warp connnector
option *cannot* be setup... we need to use a proxy rewrite)
VirtualHost 0.0.0.0
ServerAdmin [EMAIL PROTECTED] 
ServerName soc.myserver.com:80
DocumentRoot /usr/local/tomcat/webapps

RewriteEngine   on
# If URL has cocoon215/soc(/) we don't rewrite, therefore Last rule
RewriteRule ^/cocoon215/soc/(.*)  /cocoon215/soc/$1 [R,L]
RewriteRule ^/cocoon215/soc$ /cocoon215/soc [R,L]
# Else we must rewrite
#RewriteRule ^/$/cocoon215/soc [R,L]
RewriteRule ^/(.*)/cocoon215/soc/$1 [R,L]
# We reverse proxy instead of Warp connector 
ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
ProxyPassReverse /cocoon215/soc http://localhost:8080/cocoon215/soc 
/VirtualHost

In my sitemap I have:
map:match pattern=pageTest
map:generate src=docs/test.xml/
map:transform src=stylesheets/doc/test-page2html.xsl
 map:parameter name=use-request-parameters value=true/
 map:parameter name=contextPath value={request:contextPath}/
 map:parameter name=servletPath value={request:servletPath}/
 map:parameter name=serverName value={request:serverName}/
 map:parameter name=serverPort value={request:serverPort}/   


/map:transform
map:serialize/  
/map:match 

In the stylesheet (test-page2html.xsl) I have:
xsl:param name=contextPath/
xsl:param name=servletPath/
xsl:param name=serverName/
xsl:param name=serverPort/
...
pContext=xsl:value-of select=$contextPath//p
pServlet=xsl:value-of select=$servletPath//p
pServer=xsl:value-of select=$serverName//p
pPort=xsl:value-of select=$serverPort//p
But, whether I try 
http://myserver.com:8080/cocoon215/soc/pageTest 
or
http://soc.myserver.com/cocoon215/soc/pageTest 

I have the same results:
Context=/cocoon215
Servlet=/soc/pageTest
Server=myserver.com
Port=8080
In order for the application to work properly, 
what do I need to do to get to this:

Context=/cocoon215
Servlet=/soc/pageTest
Server=soc.myserver.com
Port=[null]
Any ideas how?

Cocoon will see the hostname as being the one supplied from Apache. You
have:
ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
ProxyPassReverse /cocoon215/soc http://localhost:8080/cocoon215/soc 

So Cocoon should see localhost. You could replace this with
soc.myserver.com. If that points to an external IP address, add:
127.0.0.1  soc.myserver.com
to your /etc/hosts file.
Make sense?
Regards, Upayavira

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Portal] generate navigation for non-selected tabs (Bugzilla Bug 31229)

2005-01-19 Thread Jens Maukisch
Hi,

some time ago this [1] patch was applied to generate 
a navigation for non-selected tabs. But I'm wondering
how it should be used (I've tried some things but they
didn't work).

Can anyone give me a short example how it should be used?

TIA,

[1]: http://issues.apache.org/bugzilla/show_bug.cgi?id=31229

Freundliche Grüße / With kind regards

Jens Maukisch

-- 

SN AG
Competence Center Open Source
Klingenderstr. 5 
D 33100 Paderborn

-
Wincor World 2005 - Vision at Work
Besuchen Sie unseren Gold-Partnerstand
vom 25.-27.01.05 in Paderborn
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Portal PageLabels and Events

2005-01-19 Thread Frank Taffelt
Hi,

when using :

cl:links
cl:link path=attributes/selected value={pageheader}
coplet=Header-1/
/cl:links

the resulting html link is encoded in the following form:
portal?cocoon-portal-event=18pageLabel=1.0.Infos.InfoCustomer

the current tabstate(and subtabs) is encoded in the link.

Is there a way to change the pageLabel Parameter so that it also changes the
tabstate AND the coplet attribute in one link?

Thanks,
Frank


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Creative Ideas on How to Cache Pipelines Containing Non-Cacheable Generator?

2005-01-19 Thread David Swearingen
I store all my content for a Cocoon site in xml files.  This means I make a
lot of use of the DirectoryGenerator.  It works great, but I've got now some
legacy .pdf files from another project, sometimes hundreds per directory,
sometimes on another machine on the local network, and so it takes several
seconds to collect the directory contents.  

I know that DirectoryGenerator doesn't cache, which makes sense for most
cases.  But what about cases like mine where I know the contents of a
directory only change once a day at midnight: I don't need to keep pulling
the directory's contents all day long with every page hit to my site.  I
need caching of some sort.  I don't mind if the first visitor to my site
each day has to wait 5 seconds for that page.  But if I could then capture
that created final page and store it for the rest of the day, that would be
great.

I can envision relatively cumbersome solutions like running command line
programs on chron jobs to create the data I really need, which is a subset
of files from the directory.  But all this seems intuitively
unnecessary...Cocoon is such a flexible platform that I just sense there's a
simpler Cocoon solution to this.  Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Portal] generate navigation for non-selected tabs (Bugzilla Bug 31229)

2005-01-19 Thread Jens Maukisch
Hi,

 some time ago this [1] patch was applied to generate 
 a navigation for non-selected tabs. But I'm wondering
 how it should be used (I've tried some things but they
 didn't work).
 
 Can anyone give me a short example how it should be used?

Solved the problem, it was not usable with the default portal stylesheets,
they must be extended to work properbly,

kind regards
Jens


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Portal] generate navigation for non-selected tabs (Bugzilla Bug 31229)

2005-01-19 Thread Ralph Goers
Jens Maukisch wrote:
Hi,
 

some time ago this [1] patch was applied to generate 
a navigation for non-selected tabs. But I'm wondering
how it should be used (I've tried some things but they
didn't work).

Can anyone give me a short example how it should be used?
   

Solved the problem, it was not usable with the default portal stylesheets,
they must be extended to work properbly,
kind regards
Jens
 

I'm glad you were able to figure it out.  Remember the default 
stylesheets are just samples designed to work with the sample portal as 
it is configured.  I've added several new features, but have not 
modified the sample portal (much) so as to keep it compatible.  Having 
said that, if you have a sample stylesheet we could put it in the 
directory even though it might not be referenced by anything.

Thanks.
Ralph
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Portal PageLabels and Events

2005-01-19 Thread Ralph Goers
Frank Taffelt wrote:
Hi,
when using :
cl:links
   cl:link path=attributes/selected value={pageheader}
coplet=Header-1/
/cl:links
the resulting html link is encoded in the following form:
portal?cocoon-portal-event=18pageLabel=1.0.Infos.InfoCustomer
the current tabstate(and subtabs) is encoded in the link.
Is there a way to change the pageLabel Parameter so that it also changes the
tabstate AND the coplet attribute in one link?
Thanks,
Frank
 

I'm afraid I'm not understanding what you want to happen.  Could you 
give me an example?

Ralph
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Creative Ideas on How to Cache Pipelines Containing Non-Cacheable Generator?

2005-01-19 Thread Aurélien DEHAY
Hello.
If you don't want to have a synchronous directory listing, you can use 
the cached:// protocol. Look at the cocoon.xconf about this cocoon 
pseudo protocol. I'm using this to handle caching on an heavy 
non-cachable page, it works fine.

Regards.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: [Portal] generate navigation for non-selected tabs (Bugzilla Bug 31229)

2005-01-19 Thread Jens Maukisch
Hi,

 I'm glad you were able to figure it out.  Remember the default 
 stylesheets are just samples designed to work with the sample 
 portal as 
 it is configured.  I've added several new features, but have not 
 modified the sample portal (much) so as to keep it 
 compatible.  Having 
 said that, if you have a sample stylesheet we could put it in the 
 directory even though it might not be referenced by anything.

I thought about something like a Tabdemo 3 which demonstrates this
feature. If everything is working fine I can add a patch to bugzilla.

Freundliche Grüße / With kind regards

Jens Maukisch

-- 

SN AG
Competence Center Open Source
Klingenderstr. 5 
D 33100 Paderborn

Webhttp://www.s-und-n.de

-
Wincor World 2005 - Vision at Work
Besuchen Sie unseren Gold-Partnerstand
vom 25.-27.01.05 in Paderborn
-





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cocoon Forms - how to add a confirmation dialog on submit

2005-01-19 Thread Hank Heidt

I suspected that it would be something really easy!  Thanks for the help
and the additional insight into how widgets are handled.

-Hank

-Original Message-
From: Vilya Harvey [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 19, 2005 5:07 AM
To: users@cocoon.apache.org
Subject: Re: Cocoon Forms - how to add a confirmation dialog on submit

Hank Heidt wrote:

Can any of you recommend a good way or point me to an example of how to
add a confirmation dialog, i.e., Are you sure that you want to save
the
changes? to the standard Cocoon Forms submit widget? 

I looked around and didn't see anything obvious - my hope is that there
is an easy way to do this...
  

Try this:

ft:widget id=mySubmitWidget
   fi:styling onclick=return confirm('Are you sure you want to 
save your changes?')/
/ft:widget

Any attributes of the fi:styling element which aren't explicitly 
handled by the forms XSL are copied on to the output element for the 
widget. That includes all of the standard HTML event handler attributes,

so you can easily attach client-side JavaScript to your widgets.

Hope that helps,
Vil.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



i18n, locale modification to persist?

2005-01-19 Thread oceatoon
Hi everyone

I've set up i18n localisation in our website
- initialy a page is loaded with the browsers prefs
- but then the user can click on one of the language flags adding the
request parameter ?locale=fr (ex.)

My question is: is there a way to set this new choice of locale as if it
was the browsers prefs without really touching his prefs?
I could offcourse pass around the ?locale=fr on every link from the initial
page but may be someone has a lighter idea ? like an intermediary variable
that would give language it's new value??

Thanks for the thoughts
Tibor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Portal PageLabels and Events

2005-01-19 Thread Frank Taffelt
on my layout i have an header coplet which generates a nested DHTML
Pulldown menu that is the main navigation for my site. Each link from this
menu should select the correspondig named tab or the subtab or the
subsubsubtab (and so on) depending on the nested menu level. This use-case i
could solve with the pagelabel mechanism. But my header coplet should also
set an coplet attribute with a given value for each navigation link, which
is the tricky part for me.


in short, i wanna do 2 things with one link on my html page:
a) set the attribute of a coplet named header-1 the a value
b) selects annother tab

for a:
i'm using the coplettransformer with the following syntax:

cl:links
cl:link path=attributes/selected value={pageheader}
coplet=Header-1/
/cl:links

this generates an eventlink where the pageLabel Parameter is append with the
current selected Tab.

for b:
how to change the generated link, that it also selects annother named
pageLabel, when the link is pressed?


Frank

- Original Message -
From: Ralph Goers [EMAIL PROTECTED]
To: users@cocoon.apache.org
Sent: Wednesday, January 19, 2005 4:50 PM
Subject: Re: Portal PageLabels and Events


 Frank Taffelt wrote:

 Hi,
 
 when using :
 
 cl:links
 cl:link path=attributes/selected value={pageheader}
 coplet=Header-1/
 /cl:links
 
 the resulting html link is encoded in the following form:
 portal?cocoon-portal-event=18pageLabel=1.0.Infos.InfoCustomer
 
 the current tabstate(and subtabs) is encoded in the link.
 
 Is there a way to change the pageLabel Parameter so that it also changes
the
 tabstate AND the coplet attribute in one link?
 
 Thanks,
 Frank
 
 
 
 I'm afraid I'm not understanding what you want to happen.  Could you
 give me an example?

 Ralph


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jxtemplate: cocoon.request.locale??

2005-01-19 Thread oceatoon
Hi 

I trying to retreive the value of my locale paramater in the url from within
jx but , with a url /url?locale=fr ${cocoon.request.locale} returns
nothing. It seems to be in the docs though. am I doing something wrong or
is it jx?

Thanks
Tibor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Portal PageLabels and Events

2005-01-19 Thread Frank Taffelt
on my layout i have an header coplet which generates an nested DHTML
Pulldown menu that is the main navigation for my site. Each link from this
menu should select the correspondig named tab or the subtab or the
subsubsubtab (and so on) depending on the nested menu level. This use-case i
could solve with the pagelabel mechanism. But my header coplet should also
set an coplet attribute with a given value for each navigation link, which
is the tricky part for me.


in short, i wanna do 2 things with one link on my html page:
a) set the attribute of a coplet named header-1 the a value
b) selects annother tab

for a:
i'm using the coplettransformer with the following syntax:

cl:links
cl:link path=attributes/selected value={pageheader}
coplet=Header-1/
/cl:links

this generates an eventlink where the pageLabel Parameter is append with the
current selected Tab.

for b:
how to change the generated link, that it also selects annother named
pageLabel, when the link is pressed?


Frank


- Original Message -
From: Ralph Goers [EMAIL PROTECTED]
To: users@cocoon.apache.org
Sent: Wednesday, January 19, 2005 4:50 PM
Subject: Re: Portal PageLabels and Events


 Frank Taffelt wrote:

 Hi,
 
 when using :
 
 cl:links
 cl:link path=attributes/selected value={pageheader}
 coplet=Header-1/
 /cl:links
 
 the resulting html link is encoded in the following form:
 portal?cocoon-portal-event=18pageLabel=1.0.Infos.InfoCustomer
 
 the current tabstate(and subtabs) is encoded in the link.
 
 Is there a way to change the pageLabel Parameter so that it also changes
the
 tabstate AND the coplet attribute in one link?
 
 Thanks,
 Frank
 
 
 
 I'm afraid I'm not understanding what you want to happen.  Could you
 give me an example?

 Ralph


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Portal] connexion to db with filled parameter in the query

2005-01-19 Thread José Ferreiro - TSSAG








Hello,



Did someone
try with portal engine to do perform a query to a db or something similar?

(for eg. using
coplet).



I have the
problem that when I try to post the form (an action) to start the query nothing
happends.

Did someone
have problems with action too. 



Any idea?



Thank you in
advance for some tip or suggestion about a related work.



   /JF








setting a different location for xconf

2005-01-19 Thread Ross Gardler
When running Cocoon as a Servlet I need to be able to set the location 
of cocoon.xconf to something other than WEB-INF/cocoon.xconf. Is this 
possible?

Ross
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Getting a generator class to reload

2005-01-19 Thread Nouguier Olivier
Hi all,
 A very simple way is to start tomcat within eclipse ( sysdeo plugin
http://www.sysdeo.com/eclipse/tomcatPlugin.html ).
Tomcat must be started when last version of your classes lives in the
WEB-INF/classes. ( using ant )

So the sequence *MUST* be:

  1: copy classes in WEB-INF/classes
  2: start tomcat
  3: work on *.java in eclipse.

 In this condition:
  - a: you can debug your component.
  - b: every changes in your code is immediatly reported in tomcat
process, very fun.

AFAIK 1.4 jdk classloader feature doesn-t support classes interface
modification, so if you change the class signature of a class (ie your
generator) by add field/method or changing something outside the body of
a method you will have to stop tomcat and replay sequence (1,2,3).

Don't hesitate to ask me if you encounter problem. It's work for me and
it really wonderful.



On Thu, 2005-01-13 at 10:43 +0100, Joachim Wackerow wrote:
 I am writing a custom generator. It would be convenient to reload the 
 class while Cocoon is running.
 
 How it is possible to reload just a generator class in Cocoon 2.1.6 
 running in Tomcat 5.x or 5.5, without reloading the whole Cocoon or 
 without restarting Tomcat (ca. 30 sec)?
 
 The generator class is in $TOMCAT_HOME/webapps/cocoon-2.1.6/WEB-INF/classes.
 
 This question was already asked in January 2003, but I didn't found a 
 working solution. See thread:
 http://archives.real-time.com/pipermail/cocoon-users/2003-January/028203.html
 
 Any help is appreciated.
 
 Achim
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
http://www.orcades.net




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Portal Engine: MainmenuLinkmenuSubmenu

2005-01-19 Thread Mark Ostermann
Hallo,
I am working with the Cocoon Portal Engine. I want to try out the
possibilities to build a navigation with menus that has the following
structure:

Main1   Main2   Main3   Main4   Main5   Main 6
Linktab2.1
Linktab2.2
   Subtab2.2.1
   Subtab2.2.2
   Subtab2.2.3
Linktab2.3
Linktab4

If one of the Main Tabs is pressed, you get an individual Linktab menu
for the selected Main Tab and shall get an individual Subtab menu for
the selected Linktab which is located directly under the selected
Linktab.



I have tried it with the following structure and this works very nice,
just that the Subtabs are located at the top-right of the Linktabs.

Main1   Main2   Main 3   Main4   Main5   Main6
Linktab2.1 Subtab2.2.1 Subtab2.2.2 Subtab2.2.3 
Linktab2.2
Linktab2.3
Linktab2.4


Does someone know a Solution for this and may give me a hint.

Thanks.

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: setting a different location for xconf

2005-01-19 Thread Martinson, Theresa
Check out this initialization parameter in your web.xml.  I haven't
tried this, but I'm guessing you can configure it to be whatever you
want.

init-param
  param-nameconfigurations/param-name
  param-value/WEB-INF/cocoon.xconf/param-value
/init-param

Theresa 


-Original Message-
From: Ross Gardler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 19, 2005 12:45 PM
To: users@cocoon.apache.org
Subject: setting a different location for xconf


When running Cocoon as a Servlet I need to be able to set the location 
of cocoon.xconf to something other than WEB-INF/cocoon.xconf. Is this 
possible?

Ross


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: setting a different location for xconf

2005-01-19 Thread Ross Gardler
Martinson, Theresa wrote:
Check out this initialization parameter in your web.xml.  I haven't
tried this, but I'm guessing you can configure it to be whatever you
want.
init-param
  param-nameconfigurations/param-name
  param-value/WEB-INF/cocoon.xconf/param-value
/init-param
Sorry I should have been clearer with my requirement:
I need to change the location of the cocoon.xconf file but I do not 
know, until runtime, where the location of the file is. I therefore need 
to be able to pass the parameter at the point of execution. So if I 
could use the above with runtime variable substitution that would be great.

Ross
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: setting a different location for xconf

2005-01-19 Thread Martinson, Theresa
I don't know if you can set that dynamically or not.
Maybe someone else has an idea

Theresa 


Ross Gardler wrote: 
Sorry I should have been clearer with my requirement:

I need to change the location of the cocoon.xconf file but I do not 
know, until runtime, where the location of the file is. I therefore
need 
to be able to pass the parameter at the point of execution. So if I 
could use the above with runtime variable substitution that would be
great.

Ross


Martinson, Theresa wrote:
 Check out this initialization parameter in your web.xml.  I haven't
 tried this, but I'm guessing you can configure it to be whatever you
 want.
 
 init-param
   param-nameconfigurations/param-name
   param-value/WEB-INF/cocoon.xconf/param-value
 /init-param



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Portal Engine: MainmenuLinkmenuSubmenu

2005-01-19 Thread Ralph Goers
Mark Ostermann wrote:
Hallo,
I am working with the Cocoon Portal Engine. I want to try out the
possibilities to build a navigation with menus that has the following
structure:
Main1   Main2   Main3   Main4   Main5   Main 6
Linktab2.1
Linktab2.2
  Subtab2.2.1
  Subtab2.2.2
  Subtab2.2.3
Linktab2.3
Linktab4
If one of the Main Tabs is pressed, you get an individual Linktab menu
for the selected Main Tab and shall get an individual Subtab menu for
the selected Linktab which is located directly under the selected
Linktab.

I have tried it with the following structure and this works very nice,
just that the Subtabs are located at the top-right of the Linktabs.
Main1   Main2   Main 3   Main4   Main5   Main6
Linktab2.1 Subtab2.2.1 Subtab2.2.2 Subtab2.2.3 
Linktab2.2
Linktab2.3
Linktab2.4

Does someone know a Solution for this and may give me a hint.
Thanks.
Mark
 

If I'm understanding you correctly all you have to do is modify the 
stylesheet that renders the tabs.

Ralph
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Portal PageLabels and Events

2005-01-19 Thread Ralph Goers
Unfortunately, I'm pretty sure this will require an enhancement.  If 
you'll notice in your first email you have an event along with the 
pageLabel. When a url containing a pageLabel specifying a page other 
than the current one is processed, any events attached to it are 
ignored.  This is done to allow the back button to work (or at least not 
cause an exception).  What I guess you want is for the event from the 
current page to be used against the specified pageLabel.  Unfortunately, 
it doesn't work that way.  The problem is that if it did and you went to 
that page and the user did something else and then hit the back button 
an exception might occur (or other incorrect behavior). This is because 
the event id specified in the url selected by the back button doesn't exist.

Ralph
Frank Taffelt wrote:
on my layout i have an header coplet which generates a nested DHTML
Pulldown menu that is the main navigation for my site. Each link from this
menu should select the correspondig named tab or the subtab or the
subsubsubtab (and so on) depending on the nested menu level. This use-case i
could solve with the pagelabel mechanism. But my header coplet should also
set an coplet attribute with a given value for each navigation link, which
is the tricky part for me.
in short, i wanna do 2 things with one link on my html page:
a) set the attribute of a coplet named header-1 the a value
b) selects annother tab
for a:
i'm using the coplettransformer with the following syntax:
cl:links
   cl:link path=attributes/selected value={pageheader}
coplet=Header-1/
/cl:links
this generates an eventlink where the pageLabel Parameter is append with the
current selected Tab.
for b:
how to change the generated link, that it also selects annother named
pageLabel, when the link is pressed?
Frank
 

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Portal PageLabels and Events

2005-01-19 Thread Ralph Goers
Frank Taffelt wrote:
on my layout i have an header coplet which generates a nested DHTML
Pulldown menu that is the main navigation for my site. Each link from this
menu should select the correspondig named tab or the subtab or the
subsubsubtab (and so on) depending on the nested menu level. This use-case i
could solve with the pagelabel mechanism. But my header coplet should also
set an coplet attribute with a given value for each navigation link, which
is the tricky part for me.
in short, i wanna do 2 things with one link on my html page:
a) set the attribute of a coplet named header-1 the a value
b) selects annother tab
for a:
i'm using the coplettransformer with the following syntax:
cl:links
   cl:link path=attributes/selected value={pageheader}
coplet=Header-1/
/cl:links
this generates an eventlink where the pageLabel Parameter is append with the
current selected Tab.
for b:
how to change the generated link, that it also selects annother named
pageLabel, when the link is pressed?
Frank
 

After thinking about this some more, it sounds like all you want to do 
is switch to a subnav item on another page?  If that is true than you 
can do that by configuring the support to generate the full subnav items 
and then using a style sheet to generate your links from them.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


No attribute reporting error

2005-01-19 Thread Oleg Konovalov
Hi,

Our application stopped doing anything.
That started happening after we bounced the server (JBoss 3.0.7)
with our Cocoon based app. Used to work OK.

I am getting an error in cocoon's error.log file:
ERROR   (2005-01-19) 12:13.14:048  
[sitemap.transformer.readDOMsession] (/reports/reporting/output/
contracts/contracts-list/html)
Thread-15/ReadDOMSessionTransformer: No attribute
reporting-session i
n session

Anybody knows what that error means
or what might be causing it ?
(I am new to Cocoon)

Any help would be very appreciated.


Thank you in advance,
Oleg.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon with Virtual Hosts (apache/tomcat)

2005-01-19 Thread Nouguier Olivier
hi
And what about mod_jk2?
 http://jakarta.apache.org/tomcat/connectors-doc/index.html

On Wed, 2005-01-19 at 11:43 +0200, Derek Hohls wrote:
 I am working with Apache/Tomcat and Cocoon 2.1.5. 
 I am trying to have a virtual host setup, so users from
 outside the organisation can access the site.
 
 
 In the Apache httpd.conf file, the Unix admin has inserted
 (note that I have changed some actual parameters for security...)
 the following (NB: I have been told that the warp connnector
 option *cannot* be setup... we need to use a proxy rewrite)
 
 VirtualHost 0.0.0.0
 ServerAdmin [EMAIL PROTECTED] 
 ServerName soc.myserver.com:80
 DocumentRoot /usr/local/tomcat/webapps
 
 RewriteEngine   on
 # If URL has cocoon215/soc(/) we don't rewrite, therefore Last rule
 RewriteRule ^/cocoon215/soc/(.*)  /cocoon215/soc/$1 [R,L]
 RewriteRule ^/cocoon215/soc$ /cocoon215/soc [R,L]
 # Else we must rewrite
 #RewriteRule ^/$/cocoon215/soc [R,L]
 RewriteRule ^/(.*)/cocoon215/soc/$1 [R,L]
 # We reverse proxy instead of Warp connector 
 ProxyPass /cocoon215/soc http://localhost:8080/cocoon215/soc 
 ProxyPassReverse /cocoon215/soc http://localhost:8080/cocoon215/soc 
 /VirtualHost
 
 
 In my sitemap I have:
 
 map:match pattern=pageTest
   map:generate src=docs/test.xml/
   map:transform src=stylesheets/doc/test-page2html.xsl
map:parameter name=use-request-parameters value=true/
map:parameter name=contextPath value={request:contextPath}/
map:parameter name=servletPath value={request:servletPath}/
map:parameter name=serverName value={request:serverName}/
map:parameter name=serverPort value={request:serverPort}/
 
   /map:transform
   map:serialize/  
 /map:match 
 
 
 In the stylesheet (test-page2html.xsl) I have:
 
 xsl:param name=contextPath/
 xsl:param name=servletPath/
 xsl:param name=serverName/
 xsl:param name=serverPort/
 ...
 pContext=xsl:value-of select=$contextPath//p
 pServlet=xsl:value-of select=$servletPath//p
 pServer=xsl:value-of select=$serverName//p
 pPort=xsl:value-of select=$serverPort//p
 
 
 But, whether I try 
 http://myserver.com:8080/cocoon215/soc/pageTest 
 or
 http://soc.myserver.com/cocoon215/soc/pageTest 
 
 I have the same results:
 
 Context=/cocoon215
 Servlet=/soc/pageTest
 Server=myserver.com
 Port=8080
 
 
 In order for the application to work properly, 
 what do I need to do to get to this:
 
 Context=/cocoon215
 Servlet=/soc/pageTest
 Server=soc.myserver.com
 Port=[null]
 
 Any ideas how?
 
 Thanks
 Derek
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
http://www.orcades.net




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: modifying the style of required widgets in CForms

2005-01-19 Thread Mark Lundquist
On Jan 18, 2005, at 10:38 PM, Marc Salvetti wrote:
Thanks a lot for your answers, i've just tried your idea, but i still 
can't get it to work.
Here is what i tried

xsl:import href=../resources/forms-samples-styling.xsl /
xsl:template match=* mode=custom-styling
   xsl:param name=required /
   xsl:copy
   xsl:if test=$required='true'
   xsl:attribute name=classrequired-field/xsl:attribute  
 !-- (visual properties belong in CSS) --
   /xsl:if
   /xsl:copy
/xsl:template

xsl:template match=fi:* mode=common
   !-- Apply the default transformation --
   xsl:variable name=control
   xsl:apply-imports/
   /xsl:variable
   !-- Now apply our styling --
   xsl:apply-templates select=exsl:node-set($control) 
mode=custom-styling
   xsl:with-param name=required value=@required /
   /xsl:apply-templates
/xsl:template

notice the use of match=* in the custom-styling template because i 
don't really know what's returned by exsl:node-set($control), but i 
guess it must be something like fi:* as not only the input control is 
concerned here, but also select, textarea, etc...
However, if i match
- *i get an empty span class=forms-field-required/span 
after the control (the * is gone somewhere)
- fi:* i get the *, but not the span tag

and in both cases i don't get the class=required-field attribute 
inserted on the control

I'm pretty new to xsl, so i'm not sure to understand the functioning 
of this, but i think if the template to be modified is the one spotted 
first (mode=styling, not mode=common), maybe the second template 
should be xsl:template match=fi:* mode=styling
However, if i try it,  i get the span 
class=forms-field-required*/span correctly, but the fi:styling of 
the control is lost (cols, lines)

and i still don't get the class=required-field attribute inserted on 
the control :-\

i'm a bit confused now...
Marc
Aw, phooey!  I had a brain-o there, I totally meant styling, but in 
my example I wrote common (right after I got through telling you that 
common was the wrong one! :-).  Sorry, my bad.

Yes, mode=styling is right.
Matching * on the mode=custom-styling is right, too then you will 
pick up the other kinds of form control elements, as you say.

I forgot about attributes.  Try adding this immediately inside the 
xsl:copy in the custom-styling mode template:

xsl:apply-templates select=@* /
I'll bet that fixes it!
ml (eagerly awaiting your report... I love it when other people try 
out my ideas for me :-) :-) :-)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: modifying the style of required widgets in CForms

2005-01-19 Thread Marc Salvetti
Hello Marc, thx again for the answer,
Mark Lundquist a crit :

Aw, phooey!  I had a brain-o there, I totally meant styling, but in 
my example I wrote common (right after I got through telling you 
that common was the wrong one! :-).  Sorry, my bad.

No worries, this is already very confusing anyway ;-)
Yes, mode=styling is right.
Matching * on the mode=custom-styling is right, too  then you 
will pick up the other kinds of form control elements, as you say.

I forgot about attributes.  Try adding this immediately inside the 
xsl:copy in the custom-styling mode template:

xsl:apply-templates select=@* /
I'll bet that fixes it!
nope ! lost your bet, the result is just exactly the same :-\
i tried this instead :
   xsl:copy-of select=.
   xsl:if test=$required='true'
   xsl:attribute name=classrequired-field/xsl:attribute
   /xsl:if
   /xsl:copy-of
and this copies all the attributes of the fi:styling tag to the 
control (even the type=textarea which is not supposed to be...) but 
the class=required-filed is still not copied !
Then i wonder (again) if we are matching the correct element. I think 
maybe we are matching the fi:field element where we should match the 
fi:styling... or the opposite :-D

ml (eagerly awaiting your report... I love it when other people try 
out my ideas for me :-) :-) :-)

Lol, well here is my report, do you have more ideas ?
Cheers,
Marc
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Ways to implement Dynamic XSLT in Cocoon

2005-01-19 Thread Matt Robinson
Hello.

Has anyone come across or written an transformer-based way to dynamically 
modify an XSLT template at processing time?

My challenge is this:

To facilitate Web Metric analysis, we need to embed vendor-supplied JAVA script 
in each page.  This JAVA script (and/or vendor) may change over time, and I 
want to maintain separation of concerns such that the business (as opposed to 
the Cocoon
Development Team) can make changes to the vendor and/or JAVA script content 
without requiring changes to the site coding.

The JAVA script is very dynamic and may include page-specific code that makes 
use of data embedded in the page, as well as common variables.  In short, we 
cannot include the script in the XSLT directly because of it's dynamic nature 
and the lack of XSLT
knowledge in the business.

I would like to implement a strategy whereby the script for the entire site is 
encapsulated in an XML file for each Web Metrics vendor, and a transformer uses 
this XML, coupled with a Page ID to add a template to the XSLT stylesheet 
instance being
transformed by the Xalan SAX Parser at build time.  The page data to insert 
will be represented as XPaths embedded within the extra XSLT template.

My investigations show that a good approach would be to make a copy of the 
TraxTransformer and intercept the XSLT data before it is actually transformed, 
adding the template (which has been added to the pipeline SAX events by my new
WebMetricsTransformer), and then passing a StringReader containing the new XSLT 
Source object into the transform.

Any constructive comments would be greatly appreciated

Kind Regards,

Matt Robinson



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[flow] global variable values lost between invocations

2005-01-19 Thread Adam Ratcliffe



I have a flowscript 
where I set the value of a global variable, call cocoon.session to create a 
session, but find
that it's value is 
undefined when I next invoke a top-level function in the 
script.

An excerpt from the 
scriptwhere the variable's value is set is:

 var mapContext;
 
 function createContext() {
 
mapContext = new MapContext();
 var session = 
cocoon.session;

 var redirectURI = 
cocoon.request.getParameter("redirectURI");

 
cocoon.redirectTo(redirectURI);
 
}

Any ideas on the 
possible causes of this behaviour would be much appreciated.

Cheers
Adam


Re: [flow] global variable values lost between invocations

2005-01-19 Thread Mark Lundquist
On Jan 19, 2005, at 8:31 PM, Adam Ratcliffe wrote:
I have a flowscript where I set the value of a global variable, call 
cocoon.session to create a session, but find
that it's value is undefined when I next invoke a top-level function 
in the script.

An excerpt from the scriptwhere the variable's value is set is:

 var mapContext;
 
 function createContext() {
 mapContext = new MapContext();

 var session = cocoon.session;
What version of Cocoon are you running?  A session is automatically 
created when the global variable is declared, you don't have to 
reference cocoon.session anymore... but that might be new in 2.1.6...

ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [flow] global variable values lost between invocations

2005-01-19 Thread Adam Ratcliffe
Hi Mark,

I'm running 2.1.6.  I wrote a simple test case in an independent flowscript
and that works
fine, didn't need to call cocoon.session as you suggested.

In other ideas?

Cheers
Adam

 -Original Message-
 From: Mark Lundquist [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 20 January 2005 5:47 p.m.
 To: users@cocoon.apache.org
 Subject: Re: [flow] global variable values lost between invocations



 On Jan 19, 2005, at 8:31 PM, Adam Ratcliffe wrote:

  I have a flowscript where I set the value of a global variable, call
  cocoon.session to create a session, but find
  that it's value is undefined when I next invoke a top-level function
  in the script.
  
  An excerpt from the scriptwhere the variable's value is set is:
  
   var mapContext;
   
   function createContext() {
   mapContext = new MapContext();
 
   var session = cocoon.session;

 What version of Cocoon are you running?  A session is automatically
 created when the global variable is declared, you don't have to
 reference cocoon.session anymore... but that might be new in 2.1.6...

 ml


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [flow] global variable values lost between invocations - more info

2005-01-19 Thread Adam Ratcliffe
Hi Mark,

I just did a quick test and found that the problem is occurring because the
2nd function
invocation, where the global is tested for the previously set value, is
coming from a
different sitemap.

Does this mean that each sitemap that uses a flowscript has its own separate
global variable
scope?

If so, is this a design issue that needs to be resolved i.e. where access to
shared globals
is required all matching is done in the same sitemap?

Thanks for your help,
Adam


 -Original Message-
 From: Mark Lundquist [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 20 January 2005 5:47 p.m.
 To: users@cocoon.apache.org
 Subject: Re: [flow] global variable values lost between invocations



 On Jan 19, 2005, at 8:31 PM, Adam Ratcliffe wrote:

  I have a flowscript where I set the value of a global variable, call
  cocoon.session to create a session, but find
  that it's value is undefined when I next invoke a top-level function
  in the script.
  
  An excerpt from the scriptwhere the variable's value is set is:
  
   var mapContext;
   
   function createContext() {
   mapContext = new MapContext();
 
   var session = cocoon.session;

 What version of Cocoon are you running?  A session is automatically
 created when the global variable is declared, you don't have to
 reference cocoon.session anymore... but that might be new in 2.1.6...

 ml


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ways to implement Dynamic XSLT in Cocoon

2005-01-19 Thread Mark Lundquist

On Jan 19, 2005, at 7:48 PM, Matt Robinson wrote:

Hello.

Has anyone come across or written an transformer-based way to dynamically modify an XSLT template at processing time?

The normal way to do that would be to process your first order stylesheet through a second-order stylesheet, and use the cocoon: pseudoprotocol to invoke the pipeline that does this, e.g.

generate src=some-XML/>
transform src=cocoon:/get-stylesheet />

But I'm not sure it even has to be that involved...

My challenge is this:

To facilitate Web Metric analysis, we need to embed vendor-supplied JAVA script in each page.  This JAVA script (and/or vendor) may change over time, and I want to maintain separation of concerns such that the business (as opposed to the Cocoon
Development Team) can make changes to the vendor and/or JAVA script content without requiring changes to the site coding.

The JAVA script is very dynamic and may include page-specific code that makes use of data embedded in the page, as well as common variables.  In short, we cannot include the script in the XSLT directly because of it's dynamic nature and the lack of XSLT
knowledge in the business.

I would like to implement a strategy whereby the script for the entire site is encapsulated in an XML file for each Web Metrics vendor, and a transformer uses this XML, coupled with a Page ID to add a template to the XSLT stylesheet instance being
transformed by the Xalan SAX Parser at build time.  The page data to insert will be represented as XPaths embedded within the extra XSLT template.

My investigations show that a good approach would be to make a copy of the TraxTransformer and intercept the XSLT data before it is actually transformed, adding the template (which has been added to the pipeline SAX events by my new
WebMetricsTransformer), and then passing a StringReader containing the new XSLT Source object into the transform.


Why not 

script language=javascript src=Metrics.js />

???

I can't imagine why the JS would have to be inline, but if it did, you could

(a) interpolate it using the Xinclude or Cinclude transformer; or, 
(b) interpolate it using the Xpath document() function (note, the URI can use the cocoon: scheme); or,
(c) use map:aggregate to get it into the same source stream, and merge it in in your stylesheet

All of those are standard Cocoon techniques that don't require any custom componentry.  It seems like you're wrapped around the axle of must get JS into the stylesheet, and while there's an easy way to do that (see the very beginning of this post), but if all you need to do is get some content into your final output, there are plenty of simpler ways to do that.  Or maybe I'm just not understanding your problem correctly?

cheers,
ml



Re: modifying the style of required widgets in CForms

2005-01-19 Thread Mark Lundquist
On Jan 19, 2005, at 7:29 PM, Marc Salvetti wrote:
nope ! lost your bet, the result is just exactly the same :-\
bummer!
i tried this instead :
   xsl:copy-of select=.
   xsl:if test=$required='true'
   xsl:attribute name=classrequired-field/xsl:attribute
   /xsl:if
   /xsl:copy-of
and this copies all the attributes of the fi:styling tag to the 
control (even the type=textarea which is not supposed to be...) but 
the class=required-filed is still not copied !
Well, check the reference on xml:copy-of... its contents are always 
ignored.

Can you show your whole stylesheet?  There should be no fi:styling 
element left by the time you get to the custom-styling moded 
template, because we're invoking it on the result of applying the 
imported template which has already translated the fi:* to HTML.

Then i wonder (again) if we are matching the correct element. I think 
maybe we are matching the fi:field element where we should match the 
fi:styling... or the opposite :-D
We _do_ want to match fi:field in the wrapper template (the one that 
does the apply-imports). This template  has mode=styling, so it 
only matches for apply-templates mode=styling.

But I think I see the problem... we're also going to match all kinds of 
other stuff for which there are specific templates in 
forms-field-styling.  My bad again!  So the wrapper template should 
match=fi:field, not fi:*.  Give that a try... but if it doesn't work, 
let's have a look at your whole stylesheet! :-)

GL,
ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: modifying the style of required widgets in CForms

2005-01-19 Thread Marc Salvetti
I tried your last suggestion, but that doesn't seem to help,
so here is what the custom-styling stylesheet looks like so far :
?xml version=1.0?
xsl:stylesheet version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:fi=http://apache.org/cocoon/forms/1.0#instance;
   xmlns:exsl=http://exslt.org/common; 
xsl:import href=../resources/forms-samples-styling.xsl /
xsl:template match=* mode=custom-styling
   xsl:param name=required /
   xsl:copy
   xsl:if test=$required='true'
   xsl:attribute name=classrequired-field/xsl:attribute
   /xsl:if
   /xsl:copy
/xsl:template
xsl:template match=fi:field mode=styling
   !-- Apply the default transformation --
   xsl:variable name=control
   xsl:apply-imports/
   /xsl:variable
   !-- Now apply our styling --
   xsl:apply-templates select=exsl:node-set($control) 
mode=custom-styling
   xsl:with-param name=required value=@required /
   /xsl:apply-templates
/xsl:template

/xsl:stylesheet
here is the example widget i'm testing on :
   ft:widget id=comment
   fi:styling type=textarea cols=80 rows=10 /
   /ft:widget
here is the resulting html :
   textarea title= name=comment id=comment/
   span class=forms-field-required * /span
textarea is applied no pb,
cols and rows attributes are lost,
class=required-filed is not copied.
Maybe you can see better where is the problem ?
Thanks for your help
Marc
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Ways to implement Dynamic XSLT in Cocoon

2005-01-19 Thread Conal Tuohy
Matt Robinson wrote:

 Has anyone come across or written an transformer-based way to
 dynamically modify an XSLT template at processing time?

Yes. See http://wiki.apache.org/cocoon/MetaStylesheets and also
http://wiki.apache.org/cocoon/HtmlToXsltExperiments

Cheers

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: modifying the style of required widgets in CForms

2005-01-19 Thread Mark Lundquist
Thanks for the detail.  See below:
On Jan 19, 2005, at 10:20 PM, Marc Salvetti wrote:
I tried your last suggestion, but that doesn't seem to help,
so here is what the custom-styling stylesheet looks like so far :
?xml version=1.0?
xsl:stylesheet version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:fi=http://apache.org/cocoon/forms/1.0#instance;
   xmlns:exsl=http://exslt.org/common; 
xsl:import href=../resources/forms-samples-styling.xsl /
xsl:template match=* mode=custom-styling
   xsl:param name=required /
   xsl:copy
!-- You forgot to add this (see my eariler email): --
xsl:apply-templates select=@* /
!-- That's why the attributes, e.g. 'rows'  'cols' are lost... --
   xsl:if test=$required='true'
   xsl:attribute name=classrequired-field/xsl:attribute
   /xsl:if
   /xsl:copy
/xsl:template
xsl:template match=fi:field mode=styling
   !-- Apply the default transformation --
   xsl:variable name=control
   xsl:apply-imports/
   /xsl:variable
   !-- Now apply our styling --
   xsl:apply-templates select=exsl:node-set($control) 
mode=custom-styling
	!-- d'oh, my bad!
   xsl:with-param name=required value=@required /
   That should be:
   --
  xsl:with-param name=required select=@required /
   /xsl:apply-templates
/xsl:template
/xsl:stylesheet
Give that a shot! :-)
ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: i18n, locale modification to persist?

2005-01-19 Thread John L. Webber
Hi Tibor,
How about storing the locale info in the user's session?
John
oceatoon wrote:
Hi everyone
I've set up i18n localisation in our website
- initialy a page is loaded with the browsers prefs
- but then the user can click on one of the language flags adding the
request parameter ?locale=fr (ex.)
My question is: is there a way to set this new choice of locale as if it
was the browsers prefs without really touching his prefs?
I could offcourse pass around the ?locale=fr on every link from the initial
page but may be someone has a lighter idea ? like an intermediary variable
that would give language it's new value??
--
-
 Jentro Technologies GmbH
 John L. Webber, Software Development
-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: modifying the style of required widgets in CForms

2005-01-19 Thread Marc Salvetti

Mark Lundquist a crit :
Thanks for the detail.  See below:
On Jan 19, 2005, at 10:20 PM, Marc Salvetti wrote:
I tried your last suggestion, but that doesn't seem to help,
so here is what the custom-styling stylesheet looks like so far :
?xml version=1.0?
xsl:stylesheet version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:fi=http://apache.org/cocoon/forms/1.0#instance;
   xmlns:exsl=http://exslt.org/common; 
xsl:import href=../resources/forms-samples-styling.xsl /
xsl:template match=* mode=custom-styling
   xsl:param name=required /
   xsl:copy
!-- You forgot to add this (see my eariler email): --
xsl:apply-templates select=@* /

!-- That's why the attributes, e.g. 'rows'  'cols' are lost... --
I tried it before but it didn't work, that's why i removed it...
   xsl:if test=$required='true'
   xsl:attribute name=classrequired-field/xsl:attribute
   /xsl:if
   /xsl:copy
/xsl:template
xsl:template match=fi:field mode=styling
   !-- Apply the default transformation --
   xsl:variable name=control
   xsl:apply-imports/
   /xsl:variable
   !-- Now apply our styling --
   xsl:apply-templates select=exsl:node-set($control) 
mode=custom-styling
!-- d'oh, my bad!
   xsl:with-param name=required value=@required /
   That should be:
   --
  xsl:with-param name=required select=@required /
all right! one error solved (btw, why doesn't it produce an exception 
with value ?)


   /xsl:apply-templates
/xsl:template
/xsl:stylesheet

Give that a shot! :-)
well, same same as they say here :-)
html output :
textarea title= name=comment id=comment/
span class=forms-field-required * /span
Cheers,
Marc
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]