ms_chika wrote:
I just want to know how can i pass the return value of a
javascript function to a xsl variable.
I have an xsl file and from that file i will call a javascript function
then the result will be stored in to the <xsl:variable> how will i do
that? Or is it really possible to do that or is there other way of doing
it?
Do you use an XSLT processor that supports JavaScript extension
functions? Some do, but a lot don't.
For instance with MSXML you can use J(ava)Script e.g. to write extension
functions. If you need help with that then tell us but you need to
provide more details on which processor you are using.
In the end your extension function will sit in some namespace which has
a prefix assigned and you can then write an XPath expression
prefix:extensionFunctionName()
whereever you use XPath expressions in XSLT, so to set the value of a
variable
<xsl:variable name="variableName"
select="prefix:extensionFunctionName()" />
But usually there are better, more XSLT specific ways to solve a problem
in XSLT without relying on processor specific mechanisms of extension
functions.
So you might want to ask in an XSLT group on how to solve what you want
to solve without using extension functions.
--
Martin Honnen
http://JavaScript.FAQTs.com/