RE: [xsl] Saxon and HashMap/Hashtable

Subject: RE: [xsl] Saxon and HashMap/Hashtable
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 12 Jul 2001 22:29:59 +0100
> If I need to call an Java function that has no return
> value of interest, would this be better?
> <xsl:if test="Hashtable:put('key', 'value')" />
> instead of storing the result in a variable?

Well, you're running the risk there that an XSLT processor will decide that
it doesn't matter whether the test is true or false, it's not going to
output anything anyway, so why bother evaluating it? And if it does evaluate
it, it will probably fail trying to convert a void to a boolean...

The fact of the matter is, XSLT and side-effects don't mix very well.

Mike Kay
Software AG

 XSL-List info and archive:

Current Thread