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 <[email protected]> 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 [email protected] | Web www.ucc.ie


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to