Re: Passing parameters to XSLT from the URL

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>
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.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
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.