Re: Using xsl variables in javascript

2008-02-14 Thread Tobia Conforto
Lincoln Mitchell wrote: I simple need to convert this inline javascript: script type=text/javascript function myFunction(){ xsl:choose xsl:when test= $myParam='x' alert('x') /xsl:when /xsl:choose } /script …to an external javascript file like: function myFunction(){ if

Re: Newer FOP to Cocoon 2.1.11

2008-02-14 Thread Lehtonen, Mika
Holy smoke! It works like a train toalet! Funny how the old xsl-fo templates don't much work anymore. And that is mainly because they are not created by the standard but so that they worked with fop-0.20.5. Million times thank you! You really saved my day and helped me with this Cocoon

Doing string operations over sitemap values

2008-02-14 Thread Nacho (Derecho.com)
Hola a todos: I've needed to do some of string transformations over sitemap parameters obtained from parts of a url, and i'm lookng for the smart way to it, rigth now i have done it using the method described below: * I have this URL http://localhost:8080/b/menores-de-edad; * In sitemap i have a

Re: REPOST: Losing request parameters during form error

2008-02-14 Thread Dev at weitling
Hi Derek, do you have the opportunity to try it with a more recent version of Cocoon? If you initialize a widget with a given parameter this sounds like a bug probably corrected in the meantime. Bye, Florian Derek Hohls wrote: Anyone able to help with this? Thanks! On 2008/01/08 at

Re: Doing string operations over sitemap values

2008-02-14 Thread Tobia Conforto
Nacho (Derecho.com) wrote: * I have this URL http://localhost:8080/b/menores-de-edad; * In sitemap i have a match like b/** * I need to do replace - in {1} to spaces * I do this using an input module inheriting from AbstractJXPathModule, and using a xpath like expression,

Re: Doing string operations over sitemap values

2008-02-14 Thread Joerg Heinicke
On 14.02.2008 07:42, Tobia Conforto wrote: Nacho (Derecho.com) wrote: * I have this URL http://localhost:8080/b/menores-de-edad; * In sitemap i have a match like b/** * I need to do replace - in {1} to spaces * I do this using an input module inheriting from AbstractJXPathModule, and using a

Re: response xml from Document

2008-02-14 Thread Joerg Heinicke
On 13.02.2008 05:56, nanomonk wrote: so, I have an xml generated by java(in Document now)... I need to do response this xml to client... pls tell me a true-way how to do that with cocoon 2.2? I guess you are talking about a DOM Document (org.w3c.dom.Document)? Then you can use the

Authentication in xsl:fo in Cocoon

2008-02-14 Thread Lehtonen, Mika
Hi, Cocoon 2.1.11 / TomCat 6.0.14 Cocoon is running in main host and wms-server (GeoServer) in another virtual host. Cocoon gets rasterdata from wms and renders it into pdf. So there is fo:external-graphics tag in the xsl, which has a wms-request as a src attribute. Everything works fine

Re: Doing string operations over sitemap values

2008-02-14 Thread Tobia Conforto
Joerg Heinicke wrote: Nacho (Derecho.com) wrote: {request:translate('{1}','-','')} the user might go to: http://localhost:8080/b/hello',nasty.java.call(),'world It's JXPath, not JXTemplate. Does it evaluate Java calls at all? If your example really works,

Re: REPOST: Losing request parameters during form error

2008-02-14 Thread Derek Hohls
Florian Thanks for the suggestion. I could try out a version locally, but upgrading on the servers is, unfortunately, a much longer and time-consuming process. I guess I was hoping it was not a bug. On 2008/02/14 at 02:39, in message [EMAIL PROTECTED], Dev at weitling [EMAIL PROTECTED]

Re: REPOST: Losing request parameters during form error

2008-02-14 Thread Tobia Conforto
Derek Hohls wrote: upgrading on the servers is, unfortunately, a much longer and time- consuming process. I guess I was hoping it was not a bug. Maybe it's not. Can you post a minimal example (simple form with maybe 1 widget) and minimal sitemap that exhibits the problem? Tobia

Re: MySQL Year vs CForms Date

2008-02-14 Thread Tobia Conforto
Derek Hohls wrote: if I use MySQL Year column and Cocoon Forms integer type together, then the forms validator complains that the widget is not a date type. This part I don't understand. Are you trying to apply some sort of date widget or date formatting or date validation to the integer

[2.1.11] Selectors in map:transform

2008-02-14 Thread solprovider
Cocoon-2.1.11 Selector is ignored inside a transform -- test2 is the empty string. Is this by design or a bug? Or did I miss something? solprovider XMAP Excerpt map:generate src=empty.xml/ map:transform src=test.xsl map:parameter name=test1 value=hardcoded/ map:select type=resource-exists

Re: Authentication in xsl:fo in Cocoon

2008-02-14 Thread Lehtonen, Mika
I did a quick and dirty solution: I add src=http://user:[EMAIL PROTECTED] to my fo:external-graphics tag. Just for the testing. Any better ideas? Are there any way to build something to sitemap, which would do the trick? The user has just logged into the GeoServer so there must be some

Re: [2.1.11] Selectors in map:transform

2008-02-14 Thread Joerg Heinicke
On 14.02.2008 11:02, [EMAIL PROTECTED] wrote: Cocoon-2.1.11 Selector is ignored inside a transform -- test2 is the empty string. Is this by design or a bug? Or did I miss something? This just does not work. Selector has to be outside of transform. Joerg

Re: Authentication in xsl:fo in Cocoon

2008-02-14 Thread Joerg Heinicke
If I understand it correctly you have two independent web applications in the same Tomcat instance. Couldn't you stay inside the secure area so that you don't need to authenticate from Cocoon when accessing the WMS server? I think you can check if the accessed URL was localhost or 127.0.0.1.

Re: MySQL Year vs CForms Date

2008-02-14 Thread Derek Hohls
Tobia In terms of code - assuming I have a MySQL Year-type column; Case 1: fd:field id=Year fd:labelYear/fd:label fd:datatype base=date/ /fd:field Cocoon will not accept a form entry with just a year value (e.g. 2007) and flags the entry field for the user to reenter the number. Case