Subject: Re: [xsl] problem using dyn:evaluate with MSXML From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 16 Dec 2004 15:14:53 GMT |
<xsl:variable name="y" select"'@my_attribute'"> The problem I have is that when I define $y like this : <xsl:variable name="y">@num</xsl:variable> (Which is to me exactly the same definition as before) The two ways of using xsl:variable are not equivalent and in general you should always use the first version with select= unless you really need to create a result tree. With the first $y has type string and so presumably is converted to a string in the javascript when you pass it to the msxsl script. In the second $y has type result tree fragment, which is more or less the same type as node set (it is a document node, with a text node child), that almost certainly is passed to the script as an MS DOM document node, which probably is not the type that the javascript function was expecting. If you have to use the second form, make sure it's a string before passing it over to the MS script engine by using dyn:evaluate(., string($y)) ^^^^^^^ ^ ^^^^^^^ ^ (untested) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] problem using dyn:evaluat, Matthieu Ricaud | Thread | RE: [xsl] problem using dyn:evaluat, Matthieu Ricaud |
RE: [xsl] problem using dyn:evaluat, Matthieu Ricaud | Date | [xsl] Counting preceding-siblings w, Jim Neff |
Month |