Another thing I tried to pass a variable to a JS function -- it gives the
following exception:SEVERE: XPathException in invokeTransform: Exception in
ixsl:call() (RangeError)
If I pass a string it works, but if I pass the variable it does not.
Again, I'm sure I'm doing something stupid.
Here's the transform:
<xsl:variable name="simple">
simple
</xsl:variable>
<xsl:template name="callFunc" >
<xsl:value-of select="js:myFunc($simple)"/>
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="callFunc" />
</xsl:template>
=========================
If you have the results in an XSLT variable, then I think you should be able to
pass this to Javascript code as an argument of an ixsl:call(), or you could
write it as a property of a Javascript object using ixsl:set-property.
Incidentally, we're quite close now to shipping a first version of Saxon-JS,
which will be a replacement for Saxon-CE written in pure Javascript. The
interfaces between XSLT and JS will probably be quite similar.
Michael KaySaxonica
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--