This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
problems passing a node value to a jscript function...
- To: <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] problems passing a node value to a jscript function...
- From: "Thanasis Mastrogiannis" <tmastrogiannis at screeningonline dot com>
- Date: Wed, 27 Dec 2000 10:34:32 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
I am attempting to pass (through an xsl file) the value of a node (its a
numerical date value of the type yyyymmdd) to a jscript function. The
function receives an object (used typeof function to verify that), whose
xml, text, nodevalue properties return the string 'undefined' (but when I
use <xsl:value-of I do get a value in the resulting HTML document).
Can anyone help? Below you can see the function definition and the call to
the function:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="http://mycompany.com/mynamespace" version="1.0">
<msxsl:script language="JScript" implements-prefix="user">
//function that formats the dates in the document
function xmldate(datevalue) {
thedate = "" + datevalue.xml;
return thedate.substring(0,7);
}
</msxsl:script>
.
.
.
<FONT face="arial" size="-1"> <xsl:value-of select="user:xmldate(
/roa/info/filedate )"/></FONT>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list