[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: problem using dyn:evaluate with MSXML

Subject: RE: problem using dyn:evaluate with MSXML
From: "Matthieu Ricaud" <matthieu.ricaud@xxxxxxx>
Date: Thu, 16 Dec 2004 16:37:21 +0100
dyn evaluate msxml
Thanks a lot David for your ultra quick response !!
It works perfectly :)


-----Message d'origine-----
De : David Carlisle [mailto:davidc@xxxxxxxxx]
Envoyi : jeudi 16 dicembre 2004 16:15
@ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet : Re:  problem using dyn:evaluate with MSXML



	<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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.