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

Re: XQuery question - feel free to ignore


xslt sort ignore case
On Wed, Apr 07, 2004 at 05:22:48PM -0700, Joe Fawcett wrote:
> If I have a database that supports XQuery and I construct a query that uses
> the following XPath as part of a flower statement:
> customer[surname = 'smith']
> how would you both want and expect the query to run?
> 1) Return all customers where surname equalled exactly 'smith' or
> 2) Follow the datbase matching and return 'Smith' and 'smith' and other case
> insensitive strings or
> 3) I can choose by setting a parameter before running the query which mode
> to use

(3) - in partcular, see the XPath and Functions and Operators
      descriptions of collations and of equality.  (1) will
      generally be the default.

> On a similar note if I ask for
> customer[age > 20.5]
> but age is stored as an integer would you want/expect the same sort of
> conversion to be made

Yes because you can compare an integer and a decimal.

XQuery operates on instances of the XPath 2 Data Model.  It's up
to the implementor to map correctly from the database into the
data model.  The implementation can do the casting anywhere it
likes - it should have all the information it needs to make the
decision -- but conceptually it happens on data model instances.

Liam

-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/

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.