[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Saxon and HashMap/Hashtable

Subject: RE: Saxon and HashMap/Hashtable
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 15:27:33 +0100
optimized hashmap hashtable
> Are there any other alternative so you can evaluate
> the Java and not output it to the result document?

I think that if an external function produces no result, or if the result is
not used in any way in the subsequent computation, then it's very hard to
find a way of calling it that is guaranteed not to be "optimized out".

A mechanism that should be fairly foolproof is to wrap the call inside a
call of another extension function that always returns an empty string, and
then output that string:

<xsl:value-of select="my:call(hashtable:put($a, $b))"/>

There's no way the XSLT processor can know that my:call() always returns an
empty string, so it can't really avoid doing the inner function call.
There's still no guarantee of when it does the function call, but most
processors in practice are going to execute a sequence of output
instructions sequentially.

I'm not sure if this would work for a function whose return type is void,
but fortunately that isn't the case here.

Mike Kay


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.