Re: Early Draft Review: XQuery for Java (JSR 225)
Bob Foster wrote: >> Not in my experience. Having access to a syntax tree can be quite >> useful. > > > Yes, it can. But the most common use of syntax trees is as a parse > result. A corollary in this domain would be if one could read a stored > (or user-entered) query and obtain a syntax tree from it. But I didn't > get that from the sketched proposal, which seemed to me to be > output-only. Granted, given that there is no actual proposal, one is > free to attach all sorts of wonderful things one would like to be in > it, but it would be good to know what use cases you or others are > thinking an OOPified API would address. > Here is the beginning sketchy proposal === from http://lists.xml.org/archives/xml-dev/200405/msg00346.html >With algebraic types, it would be possible to build up an abstract >syntax tree, which would be passed to the driver before shipping to the >database. > === end The algebraic types bit does not matter, it really boils down to having an ast or a similar representation. All this started to avoid having only strings. I don't think asking for use cases makes much sense: you can include o all use cases of the string based API (as all of this is possible, either with the objects, or using some wrappers that parse strings), plus o having a high-level representation of queries (introspection, reflection, (schema?)validation) It is not obvious to do any of the latter use cases with strings (unless you parse them), and good design does not a priori make it more difficult to get work done. cheers, Burak
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format