Subject: Re: document scope difficulty (Was: decode( source, ... )
From: James Clark <jjc@xxxxxxxxxx>
Date: Tue, 05 Oct 1999 16:08:34 +0700
|
Steve Muench wrote:
>
> I get mon34 as the output using our Oracle XSLT
> engine so I'm pretty sure the sum one is just a bug.
It's not. XPath says that "A / by itself selects the root node of the
document ***containing the context node.***"
The solution is to have a top-level variable pointing to the root of the
main document:
<xsl:stylesheet>
<xsl:variable name="main" select="/"/>
and then use
sum($main//amount)
James
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|