Re: setting parameters on XSLT Prozessor

Spank Master <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Message-ID <[email protected]>
Am 13 May 2006 09:33:15 -0700 schrieb erwy:

> (sorry for my english, do not hesitate to correct me )
> 
> Hi,
> 
> I'm not sure that's the problem but this writing
> 
> 
> <xsl:param name="gSelectedNode">/root</xsl:param>
> ..
>    <xsl:when test="$gSelectedNode = '/root'> .....</xsl:when>
> 
> 
> is a bad idea
> 
> 
> You're $gSelectedNode  is not a default type "string" but the very
> special "fragmentNode" of xslt 1.0 , a type that you must use with
> precautions .
> 
> try
> 
> <xsl:when test="string($gSelectedNode) = '/root'> .....</xsl:when>

My code is now running. The problem was that I called 2 different
JavaScript functions and the XSLT-Processor was not defined global so of
course using setParameter in 1 of the functions did not work!!!!! My fault.

But another question on the type of parameter. I can not set a type by
declaring it in XSLT or using setParameter, can I ?

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

thx a lot
Sebastian
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.