This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: xsl: variable problem


> Could you please tell me the problem with my xsl.  When I passed the
> variable to my javascript function, it is not passing whatever I'm
> expecting.
>
> <xsl:value-of select="user:calcTot({$credAmt})"/>
>
This is a syntax error, it shouldn't execute at all. Curly braces are not
allowed within an XPath expression.

In general when calling JavaScript you need to take care to pass the right
type of value for the Javascript function. If it's expecting a node-set,
pass it a node-set; if it's expecting a string, use the XPath string()
function to convert the value to a string.

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]