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

Re: Early Draft Review: XQuery for Java (JSR 225)


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!

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.