Subject: Re: [xsl] Get Variables in XSL from URL From: Andrew Franz <afranz0@xxxxxxxxxxxxxxxx> Date: Sat, 29 Apr 2006 11:01:06 +1000 |
Hello, I would like to get some variables from the URL (file.xml?var1=value1&var2=value2) in the test.xml's xsl file (all of this in the client-side) and so have try this code: <msxsl:script language="javascript" implements-prefix="prefix"> function getURLvar(name){ var params = location.search.substring(1).split("&"); var variables = new Array(); for (i in params) { var segments_var = params[i].split("="); variables[segments_var[0]] = unescape(segments_var[1]); } function setFile(file) { iSend = send; } return variables[name]; } </msxsl:script>
and use this one to print on screen the value of the GET variables....
<xsl:value-of select="prefix:getURLvar(test)" />
But it seems not to be a good Method... and i ask if their is a better solution to achieve my goal.
Thanks, and sorry for my bad english.
Maxime G.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Naming a new XML file fro, Jon Gorman | Thread | Re: Re: [xsl] Get Variables in XSL , miouge@xxxxxxxxxxx |
RE: [xsl] Is this strategy for runt, Michael Kay | Date | Re: [xsl] Concatinating a string wi, Florent Georges |
Month |