You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Lenya L. Khachaturov" <le...@chemsell.yaroslavl.ru> on 2003/01/31 15:04:21 UTC
Passing User-Agent as a map:parameter
Hello,
I'd like to know if it's possible. I would like to do the following:
<map:transform src="blog/blog.xsl" type="xslt">
<map:parameter name="browser" value="USERAGENT"/> </map:transform>
So that in my XSL I could write the following:
<xsl:if test="$browser='ie'">
<link rel="stylesheet" href="ie.css" type="text/css"/>
</xsl:if>
<xsl:if test="another browser">
link to another CSS
</xsl:if>
The example in the Browser Selector docs is not what I really want - I
don't need different XSLs for different browser.
--
Lenya Khachaturov
mailto:lenya@chemsell.yaroslavl.ru
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Passing User-Agent as a map:parameter
Posted by "Lenya L. Khachaturov" <le...@chemsell.yaroslavl.ru>.
On Fri, Jan 31, 2003 at 07:20:39PM +0100, Marco Rolappe wrote:
> hi lenya,
>
> I haven't yet really been into input modules, but I think you could use
> something like:
>
> <map:transform src="blog/blog.xsl" type="xslt">
> <map:parameter name="browser" value="header:user-agent"/>
> </map:transform>
>
Thanks for the hint! Actually, the parameter's value should be
request-header:user-agent. It works great!
--
Lenya Khachaturov
mailto:lenya@chemsell.yaroslavl.ru
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
AW: Passing User-Agent as a map:parameter
Posted by Marco Rolappe <m_...@web.de>.
hi lenya,
I haven't yet really been into input modules, but I think you could use
something like:
<map:transform src="blog/blog.xsl" type="xslt">
<map:parameter name="browser" value="header:user-agent"/>
</map:transform>
> -----Ursprungliche Nachricht-----
> Von: cocoon-users-return-45909-m_rolappe=web.de@xml.apache.org
> [mailto:cocoon-users-return-45909-m_rolappe=web.de@xml.apache.org]Im
> Auftrag von Lenya L. Khachaturov
> Gesendet: Freitag, 31. Januar 2003 15:04
> An: cocoon-users@xml.apache.org
> Betreff: Passing User-Agent as a map:parameter
>
>
> Hello,
>
> I'd like to know if it's possible. I would like to do the following:
>
> <map:transform src="blog/blog.xsl" type="xslt">
> <map:parameter name="browser" value="USERAGENT"/>
> </map:transform>
>
> So that in my XSL I could write the following:
>
> <xsl:if test="$browser='ie'">
> <link rel="stylesheet" href="ie.css" type="text/css"/>
> </xsl:if>
>
> <xsl:if test="another browser">
> link to another CSS
> </xsl:if>
>
> The example in the Browser Selector docs is not what I really want - I
> don't need different XSLs for different browser.
>
> --
> Lenya Khachaturov
> mailto:lenya@chemsell.yaroslavl.ru
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>