Hello,
I am developing a website that has a drop down menu populated with 'user types' ie: customers, buyers, ect...
And below this menu is a list of links.
This list of links changes based on the selection of user type chosen.
So the XML would look like this for each link:
<link>
<title>Headline </title>
<url>link-to-page.html</url>
<users>customer s</users> <!--User type(s) in this element-->
</link>
So far we have been filtering our data in the following way through XSL:
<xsl:if test="contains( users,'customer s')">
This works fine, however, we would like a way of passing a variable to
the xsl file so that we don't have to have a different xsl file to
filter each user role.
So perhaps it would look like this:
<xsl:if test="contains( users,'$user')" >
with
$user
being the variable.
Is it possible to pass a variable from the browser (via javascript or
something else) to the xsl file so that we can use one xsl file as our
filter?
Thanks a lot, and if this was completely confusing, I apologize.
-WillyP
I am developing a website that has a drop down menu populated with 'user types' ie: customers, buyers, ect...
And below this menu is a list of links.
This list of links changes based on the selection of user type chosen.
So the XML would look like this for each link:
<link>
<title>Headline </title>
<url>link-to-page.html</url>
<users>customer s</users> <!--User type(s) in this element-->
</link>
So far we have been filtering our data in the following way through XSL:
<xsl:if test="contains( users,'customer s')">
This works fine, however, we would like a way of passing a variable to
the xsl file so that we don't have to have a different xsl file to
filter each user role.
So perhaps it would look like this:
<xsl:if test="contains( users,'$user')" >
with
$user
being the variable.
Is it possible to pass a variable from the browser (via javascript or
something else) to the xsl file so that we can use one xsl file as our
filter?
Thanks a lot, and if this was completely confusing, I apologize.
-WillyP
Comment