[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Client-side XSLT processing by browsers
Hi JJ,
Passing parameters in the querystring is an HTML construct, not an XSL one. Also, there are 4 different types in XSL (string, boolean, number and nodeset), how would you differentiate between these in a querystring-based manner? Remember that the type must be declared before passing to the XSL stylesheet. I think, to achieve somewhat what you want, you will have to make an html page that accepts querystring parameters and then uses javaScript to pass these into the desired XSL document and doing the transformation, using itself as the input document, if you desire this. I know that this is not what you had hoped for, but I hope my answer is of some small help anyway. Regards, Ragulf Pickaxe :-) On 8/27/06, JJ Merelo <jjmerelo@xxxxxxxxx> wrote: Hi, I have been looking for info on using the XSLT processors in browsers, namely Firefox and Opera. They seem to work well (although, if you use them on the client side, Firefox requires the extension .xhtml to apply xslt properly), but the problem I have found is that the only way to pass parameters to the XSLT stylesheet is using it via Javascript. What I want to do is something like this: process a file locally using filename.xhtml?param1=value1;param2=value2 and so on with filename.xhtml having: <?xml-stylesheet href="stylesheet.xsl" type="text/xsl"?> and, in stylesheet.xsl <xsl:param name='param1'> on the XSLT stylesheet. I have tested in in Firefox and Opera, and it does not seem to pick up the parameters. Is there any other way of passing params to that stylesheet? Or at least, a way that works? What I want to do is to present different content depeding on the way it's called. For instance, calling filename.xhtml?mode=index would just return the <h2> tags and so on.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|