Re: Passing parameters to XSLT from the URL

Jonas Sicking <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Message-ID <[email protected]>
Additionally, in FF2 and on you can pass parameters using a new 
processing instructions, <?xslt-param?>. You can read all the docs here:

http://wiki.mozilla.org/XSLT_PI_Parameters

Using this you could use CGI to set parameters through your xml file.

/ Jonas

Martin Honnen wrote:
> JJ Merelo wrote:
> 
> 
>> <xsl:param name='seccion' />
> 
> 
>> Which I call with this url:
>> file:///home/jmerelo/public_html/tutoriales/XSLT/tiendecilla.xml?seccion=Muebles 
>>
>>
>> But it does not work; the param seccion does not get instantiated.
>> What's the problem? Does the XSLT processor in Mozilla handle params
>> only if they're sent by the server (I didn't try that, but, in any
>> case, I'd like to use it stand-alone) Should parameters be sent any
>> other way?
> 
> 
> Parameters have be set with the API the XSLT processor exposes, so in 
> case of Mozilla you can instantiate new XSLTProcessor(), load a 
> stylesheet, set parameters, run the transformation, see
> <http://developer.mozilla.org/en/docs/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations> 
> 
> 
> There is nothing in the XSLT specification suggesting that global 
> parameters should be set from the query string of the URL of an XML 
> document to which a transformation is applied.
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.