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

RE: Saxon processing problem...

Subject: RE: Saxon processing problem...
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 30 Mar 2008 16:35:43 +0100
RE:  Saxon processing problem...
> On Sun, 2008-03-30 at 16:00 +0100, Michael Kay wrote:

It was actually 23:00+0800, but my computer didn't know that.

> > The other thing that would make the optimizer's life much 
> easier is to 
> > declare the types of parameters such as $grp-size, in this 
> case using 
> > 'as="xs:double"' in the xsl:param declaration.
> 
> Is there a document or something that describes best 
> practices for making the (saxon) optimizer's life easier?

Sadly, no. But I do tell people repeatedly that declaring the types of
parameters is always recommended. Primarily because it's a good way of
catching your programming mistakes, but it also means that the compiler has
more information to work with. In this particular case the use of $grp-size
inside an arithmetic expression inside a predicate caused Saxon to generate
code to atomize the value of the variable and check that it was
single-valued; it was then trying to move this code out of the predicate to
avoid doing it repeatedly. If the type had been declared, then Saxon would
have known that these run-time checks weren't needed and therefore didn't
need to be optimized.

None of which, of course, directly relates to the bug in question.

Michael Kay
http://www.saxonica.com/

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.