|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to pass ancestor to a function?
Hi,
i am using IE5 .
i hope somebody is able to solve this problem.
we have a xml which looks like:
<?xsl version="1.0"?>
<Company>
<Employee empcode="1">
<Project pcode="p1">
<Duration hours="10" />
</Project>
<Project pcode="p2">
<Duration hours="8" />
</Project>
</Employee >
<Employee empcode="2">
<Project pcode="p1">
<Duration hours="14"/>
</Project>
<Project pcode="p2">
<Duration hours="6" />
</Project>
<Project pcode="p3">
<Duration hours="12" />
</Project>
</Employee >
</Company>
Problem:
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 company.is it possible?-->
</xsl:for-each>
<xsl:script>
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 ? */
}
</xsl:script>
i hope the problem is clear and somebody comes up with its solution.
Thanks in advance.
regards,
anand.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








