You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hubert Holtz <Tu...@gmx.net> on 2003/05/13 15:42:23 UTC
How to get the Browser URL within XSL?
Hy all,
First of all I do not know if this is a pure xsl or cocoon question so i mail it to both lists.
I know I can access the request parameters of the url in xsl using the xsl-with-parameters type in my sitemap,
but how can I get the whole URL string in xsl.
The reason why I need to get this, is that I have the following URL structure:
http://www.somwhere.de/test/program.html?id=300&lang=ger
and I want to change the lang value to another value (eng i.e.) by clicking on my flag symbol, the problem is that I don't know
the sitename in front of .html, because I just want to change the lang parameter the rest should be the same,
depending on the last requested url (or is it possible to get this value inside xsl?) !
I'm using Cocoon 2.03 on tomcat4.1.
Any help is welcome.
Regards, Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: [xsl] How to get the Browser URL within XSL?
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
I believe that Cocoon has a Xalan Extension for the HttpServletRequest
request object somewhere within it. you should be able to access the
request object by using it.
I wrote a similar extesion for Saxon. I'd like to see information on one
for Xalan as well.
-Mark
Hubert Holtz wrote:
> Hy all,
>
> First of all I do not know if this is a pure xsl or cocoon question so i mail it to both lists.
>
> I know I can access the request parameters of the url in xsl using the xsl-with-parameters type in my sitemap,
> but how can I get the whole URL string in xsl.
>
> The reason why I need to get this, is that I have the following URL structure:
>
> http://www.somwhere.de/test/program.html?id=300&lang=ger
>
> and I want to change the lang value to another value (eng i.e.) by clicking on my flag symbol, the problem is that I don't know
> the sitename in front of .html, because I just want to change the lang parameter the rest should be the same,
> depending on the last requested url (or is it possible to get this value inside xsl?) !
>
> I'm using Cocoon 2.03 on tomcat4.1.
>
> Any help is welcome.
>
> Regards, Steve
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to get the Browser URL within XSL?
Posted by Jakob Praher <jp...@yahoo.de>.
Am Die, 2003-05-13 um 16.38 schrieb Jakob Praher:
> use the following:
>
> <map:transform type="xslt" ...>
>
this should be:
<map:parameter name="request-uri" value="{request:requestURI}" />
>
> </map:transform>
>
> @see samples/modules/sitemap.xmap
>
> -- Jakob
>
> Am Die, 2003-05-13 um 15.42 schrieb Hubert Holtz:
> > Hy all,
> >
> > First of all I do not know if this is a pure xsl or cocoon question so i mail it to both lists.
> >
> > I know I can access the request parameters of the url in xsl using the xsl-with-parameters type in my sitemap,
> > but how can I get the whole URL string in xsl.
> >
> > The reason why I need to get this, is that I have the following URL structure:
> >
> > http://www.somwhere.de/test/program.html?id=300&lang=ger
> >
> > and I want to change the lang value to another value (eng i.e.) by clicking on my flag symbol, the problem is that I don't know
> > the sitename in front of .html, because I just want to change the lang parameter the rest should be the same,
> > depending on the last requested url (or is it possible to get this value inside xsl?) !
> >
> > I'm using Cocoon 2.03 on tomcat4.1.
> >
> > Any help is welcome.
> >
> > Regards, Steve
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to get the Browser URL within XSL?
Posted by Jakob Praher <jp...@yahoo.de>.
use the following:
<map:transform type="xslt" ...>
<map:param name="request-uri" value="{request:requestURI}" />
</map:transform>
@see samples/modules/sitemap.xmap
-- Jakob
Am Die, 2003-05-13 um 15.42 schrieb Hubert Holtz:
> Hy all,
>
> First of all I do not know if this is a pure xsl or cocoon question so i mail it to both lists.
>
> I know I can access the request parameters of the url in xsl using the xsl-with-parameters type in my sitemap,
> but how can I get the whole URL string in xsl.
>
> The reason why I need to get this, is that I have the following URL structure:
>
> http://www.somwhere.de/test/program.html?id=300&lang=ger
>
> and I want to change the lang value to another value (eng i.e.) by clicking on my flag symbol, the problem is that I don't know
> the sitename in front of .html, because I just want to change the lang parameter the rest should be the same,
> depending on the last requested url (or is it possible to get this value inside xsl?) !
>
> I'm using Cocoon 2.03 on tomcat4.1.
>
> Any help is welcome.
>
> Regards, Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org