shotsy247
03-09-2010, 08:18 AM
Hi All,
I'm new to XSLT and need some help using parameters (I think).
I am building out a multi-language, multi-product landing page. My thought is that I will be able to add a URL parameter such as:
http:www.mypage.com?lang=uk&prod=ff
I have read that these values should pass to parameters I set up in my XSLT as such:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:param name="lang" select="en" />
<xsl:param name="prod" select="ie" />
Can anyone confirm that this should work? If not how do people pass in dynamic data?
Once I have the parameters from the URL how would I use it to change the template that is used? I have tried a few things like:
<xsl:template match="$lang">
But I get errors.
Thanks in advance for any help.
_t
I'm new to XSLT and need some help using parameters (I think).
I am building out a multi-language, multi-product landing page. My thought is that I will be able to add a URL parameter such as:
http:www.mypage.com?lang=uk&prod=ff
I have read that these values should pass to parameters I set up in my XSLT as such:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:param name="lang" select="en" />
<xsl:param name="prod" select="ie" />
Can anyone confirm that this should work? If not how do people pass in dynamic data?
Once I have the parameters from the URL how would I use it to change the template that is used? I have tried a few things like:
<xsl:template match="$lang">
But I get errors.
Thanks in advance for any help.
_t