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]

problems passing a node value to a jscript function...


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


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