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

Top N Most Common Mistakes

John Snelson john.snelson at oracle.com
Sun Aug 5 19:46:41 PDT 2007


  Top N Most Common Mistakes
The three biggest user mistakes I think I see are:

1) Operator precedence after "return".
2) Use of old XQuery syntax from old tutorials ("define" vs "declare" etc.)
3) Use of ".../text()" when the user really means ".../data()" or 
".../string()" (or should rely on implicit atomization). The trouble is 
that the answer (after implicit atomization and casting) is often the 
same, but the meaning is entirely different. This can cause schema-less 
XML databases like Berkeley DB XML to be unable to use it's indexes in 
these cases.

John

Frans Englich wrote:
> Yes, what are they? What are the most common mistakes that novice, experienced 
> a like, do when writing XQuery queries?
> 
> I have little contact with users and can therefore contribute poorly:
> 
> 1. That axis steps uses the default element namespace, which possibly is set 
> by a namespace binding on an enclosing element constructor. Hence the path 
> expression automagically misses.
> 
> 2. Expression precedence related to the return clause combined with variable 
> references. In "... return 1 + $f", The variable $f, if bound in the parent 
> let/for clause, is out of scope.
> 
> I suspect a couple of points related to axes can be found, perhaps especially 
> related to navigation order versus document order.
> 
> On a broader more conceptual scale, what is the big challenge for learning 
> XQuery, especially if having a C++/Java background? "I'd rather wait until 
> XSL-T has turned into a real language, such that one can assign to 
> variables," reveals how hard the functional approach of XQuery/XSL-T can be 
> to grasp.
> 
> 
> 
> Cheers,
> 
> 		Frans
> _______________________________________________
> http://x-query.com/mailman/listinfo/talk
> http://x-query.com/mailman/listinfo/talk



PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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.