[xsl] accessing xsl with XML DOM and javascript

Subject: [xsl] accessing xsl with XML DOM and javascript
From: "Elise D." <tyris_azriel@xxxxxxxx>
Date: Tue, 24 Jul 2001 15:26:56 +0200 (CEST)
hi all,

i do have an xsl where i call a javascript function
inside :

	<xsl:for-each select="./*[1]">
		<tr bgcolor="6699cc">
			<xsl:for-each select="./*">
					><xsl:value-of select="user:getName(.)"/>

and here is the script inside the xsl :

xmlns:user="urn:user-namespace-here" version="1.0">
<msxsl:script language="javascript"
    	function getName(node)		
		return node.item(0).nodeName;

here is my xml structure :

		<field name="Project Site">Paris</field>
		<field name="end date">07/04/2001</field>
		<field name="Project name">Microsoft Visio 10 VS
Help </field>
		<field name="Project Code">ITOSE01001</field>
		<field name="Status">Go</field>

the problem is that my function returns me the name of
the node (field) and in fact i'd like to get the value
of the "name" attribute (example : end date).
i tryed to put return

but it doesn't work.

so someone give me the correct syntax ?

elise, xml learning girl

Do You Yahoo!? -- Vos albums photos en ligne, 
Yahoo! Photos : http://fr.photos.yahoo.com

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

Current Thread