Re: setting parameters on XSLT Prozessor

Jonas Sicking <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Message-ID <[email protected]>
Spank Master wrote:
> But another question on the type of parameter. I can not set a type by
> declaring it in XSLT or using setParameter, can I ?

You can always make sure to get the type that you want. In your previous 
example you could just do

<xsl:param name="gSelectedNode" select="'/root'" />

sets the parameter to a string. And when setting that parameter from 
javascript doing

.setParameter("", "gSelectedNode", "my string here")

will set it to a string.

> So what you suggest is make it a string by calling string($gSelectedNode)
> is that right? I'll do that just in case.

Usually you don't need to worry though. XPath and XSLT usually convert 
types as needed.

/ Jonas
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.