Re: Getting the value of the browser selector

2014-02-11 Thread Peter Flynn

Does anyone have any more information about the browser selector?
Specifically, how to pass its value into a pipeline as a parameter to 
the XSLT?


///Peter

On 19/12/13 15:51, Peter Flynn wrote:

On 19/12/13 12:46, Christopher Schultz wrote:

Peter,


On Dec 19, 2013, at 4:24, Peter Flynn pfl...@ucc.ie wrote:

Let me try again in a shorter post :-)

1. Has anyone ever used the browser selector?

2. Can it be used to pass the *value* to a transformation as a
parameter without resorting to map:when, instead of just doing
selection?


Isn't the value of the browser selector the same as the user-agent
header value?


I don't think so.
http://cocoon.apache.org/2.1/userdocs/browser-selector.html says:

map:select type=browser
   map:when test=netscape
   
   /map:when
   map:when test=explorer
   ...
   /map:when
   ...
   map:otherwise
   ...
   /map:otherwise
/map:select

In other words you can take alternate action based on the test=...
value, but you cannot pass that actual value into the XSLT as a parameter.


You can just pass-in the header to the transformation... No need for
the browser selector.


But then I'd have to parse the user-agent string in my XSLT. The whole
point of the browser selector is that it's done for you in the sitemap.

///Peter



///Peter
--
Peter Flynn | Electronic Publishing Unit | IT Services | University 
College Cork | Phone +353 21 490 2609 | Email pfl...@ucc.ie | Web www.ucc.ie



-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



How-to configure spring singleton resource in block of C2.2

2014-02-11 Thread Miguel

Hi

 My custom block of my application Cocoon 2.2 use a resource configured 
in spring. this resource is defined like singleton scope in spring 
section of block. Besides I have a custom generator that it use this 
spring resource.


Happens when I start my web application spring context load my resource, 
but when I call first time to custom generator the spring resource 
execute methods of shutdown and init, again.


if I move configuration of resource to applicationContext.xml of my web 
application (in the same place of Configure Log4j), then resource only 
init once time, but I can not debug or start alone my block.


Any ideas?

Best regards


attachment: miguel_valencia.vcf
-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org