How to pass ancestor to a function?

Subject: How to pass ancestor to a function?
From: "Anand A Tarkas , Gurgaon" <atarkas@xxxxxxxxxxxxxxx>
Date: Mon, 24 May 1999 17:31:11 +0530
i am using IE5 .
i hope somebody is able to solve this problem.

we have a xml which looks like:
<?xsl version="1.0"?>
      <Employee empcode="1">
             <Project pcode="p1">
	      <Duration hours="10" />	 
	<Project pcode="p2">
	       <Duration hours="8" />	 
      </Employee	>
      <Employee empcode="2">
             <Project pcode="p1">
	      <Duration hours="14"/>	 
	<Project pcode="p2">
	       <Duration hours="6" />	 
            <Project pcode="p3">
	       <Duration hours="12" />	 
      </Employee	>

Does xsl have any way of  passing ancestor  to a function written in
Javascript ?
i have something like this

<xsl:for-each select="Company/Employee/Project">
<xsl:eval> total(this) </xsl:eval> <!-- instead of  "this" i want to pass
the root of the document i.e it possible?-->

	function total(Project)
	     /* is it possible to get the root of the document or any other
ancestor node of what is passed, in this function ?	*/

i hope the problem is clear and somebody comes up with its solution.
Thanks in advance.

 XSL-List info and archive:

Current Thread