[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

What do people do about warnings?

Michael Kay mike at saxonica.com
Fri Jan 12 11:45:31 PST 2007


  What do people do about warnings?
> I'm surprised that you find it necessary to try to fool the 
> query optimiser into not getting rid of your trace() function 
> call. I would consider it a bug if it was optimised out of 
> your query - certainly the XQuery implementations I work on 
> would not do that.

It's a difficult decision. People might be using trace() to debug the logic
of the application, in which case it makes sense for the optimizer to treat
trace() as a signal to optimize less aggressively. On the other hand, they
might be using trace() to examine how the optimized query actually executes,
in which case the optimizer should try and treat a query containing trace()
calls exactly as if those calls weren't there: which means for example that
if the expression being traced isn't actually evaluated, then it isn't
traced.

Saxon tends towards the latter. For example if you write

(1 to 10, trace($x, "banana"))[1]

you will see no trace output, because the trace() expression is never
evaluated.

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




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-2007 All Rights Reserved.