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

Re: "Query by example" (was Re: misprocessing namesp


query by example
XML-QL[1] also has a nice "QBE" type syntax, but in a non-XML language:

WHERE
<cars>
   <car><MakeModel>Ford</></> element_as $car
</>
IN "someDataSource"
CONSTRUCT $car

As you mentioned, it great for simple things, and can't handle XPaths.

-Wayne Steele

[1] http://www.w3.org/TR/NOTE-xml-ql/


>From: "Evan Lenz" <elenz@x...>
>To: "Gavin Thomas Nicol" <gtn@r...>, "The Deviants" 
><xml-dev@l...>
>Subject:  "Query by example" (was Re:  misprocessing 
>namespaces)
>Date: Thu, 31 Jan 2002 09:12:54 -0800
>
>Gavin Thomas Nicol wrote:
> > The idea was "match by example", where you'd
> > give a sample XML fragment as the pattern to match. It was supposed to
> > be like "query by example"....
>
>The "query by example" approach can only get you so far. For example, this
>XPath expression:
>
>   /Cars/Car[contains(MakeModel,'ford')]
>
>could easily be formed in XML syntax as follows:
>
>   <Cars>
>     <Car>
>       <MakeModel>Ford</MakeModel>
>     </Car>
>   </Cars>
>
>This is reminiscent of Examplotron[1]. The primary difference is that
>Examplotron is "schema by example", where our intent here is "query by
>example".
>
>The difficulty of this approach arises when you try to accommodate the 
>XPath
>axes. Soon, the benefits of the XML syntax start to diminish. A different
>approach would have to be taken, such as Wayne Steele's contribution[2] 
>last
>March. That XML tools could then be used on XPath is valuable, but this no
>longer possesses the simplicity and intuitiveness of a "query by example"
>approach.
>
>That said, "query by example" works beautifully for applications that don't
>need as powerful a query language as, say, XQuery. For applications that
>simply require the extraction of XML fragments from large repositories of
>XML documents based on certain search criteria, a simple XML-based "query 
>by
>example" approach is sufficient, with more sophisticated processing (e.g.
>XSLT) commencing outside the database.
>
><proprietaryExample product="XYZFind Server">
>Query for all cars such that 'Color' contains "white", 'MakeModel' contains
>"ford" and 'Price' is less than or equal to "$15,000":
>
>   <xyz:input xmlns:xyz="http://xyzfind.com...">
>     <xyz:query>
>       <Cars xyz:return="no">
>         <Car xyz:return="yes">
>           <MakeModel>ford</MakeModel>
>           <Price><xyz:number le="15000"/></Price>
>           <Color>white</Color>
>         </Car>
>       </Cars>
>     </xyz:query>
>   </xyz:input>
>
></proprietaryExample>
>
>Evan Lenz
>http://www.xyzfind.com
>
>[1] http://examplotron.org/
>[2] http://www.xmlhack.com/read.php?item=1118
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>
>


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.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
 

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.