Subject: Re: [xsl] passing values from JavaScript to XSL using MSXML3 From: "Sergey Demidenko" <sergeyd@xxxxxxx> Date: Mon, 21 Jul 2003 14:21:24 -0400 |
Neil and Bryan, thanks for the help. But I am still confused about the best way of doing what I'm tring to accompish. Here is what it is: I have two sort options, a menu and radio buttons, that are supposed make the XML data be sorted according to any specified tag and acend or decend. I am sure this comes up often, but I don't know if there is a good solution for it. Another thing to note is that I do my transformation on the server-side with PHP. I have some questions. How is it possible to use the <xml:param> element inside <xsl:template match="/">? and Why can't you just do something like this: <xml:param name="sortBy"><input name="sortOrderButton" type="radio" value="ascending">Ascending</input></xml:param>, that is after you manage it to get it inside <xsl:template match="/">? So if this all doen't work out I am just going to stick to <msxsl:script> ----- Original Message ----- From: "Neil Smith" <neil@xxxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Cc: <sergeyd@xxxxxxx> Sent: Monday, July 21, 2003 7:36 AM Subject: [xsl] passing values from JavaScript to XSL using MSXML3 > At 02:30 21/07/2003 -0400, you wrote: > >Date: Sun, 20 Jul 2003 03:00:10 -0400 > >From: "Sergey Demidenko" <sergeyd@xxxxxxx> > >Subject: [xsl] passing values from JavaScript to XSL using MSXML3 > > Load your stylesheet then reference the param using an XPath expression : > Replace 'sortvalue' by whatever your intended value is then transform the > XML document as normal with your modified stylesheet. > > oxmlStyleSheet=new ActiveXObject("MSXML2.DOMDocument"); > oxmlStyleSheet.selectSingleNode("//xsl:param[@name='sortBy']").value=sortval ue; > > (or >>>> ) > > oxmlStyleSheet.selectSingleNode("//xsl:param[@name='sortBy']").setAttribute( "select",'date'); > > Depends on your question :-) > > >I need to pass a value from JavaScript code to <xsl:param name="sortBy" > >select="'date'" /> in XSL code. > >How would I accomplish this? > > PS the XPath may not be exactly right for your document - please check and > modify if necessary. Sorry if this was already answered - I was out all > weekedn at a festival :-) > > Cheers - Neil > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] passing values from JavaScrip, Neil Smith | Thread | RE: [xsl] passing values from JavaS, bryan |
[xsl] Datatype Library Language by , Dimitre Novatchev | Date | RE: Re: [xsl] inheritance and encap, cknell |
Month |