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

Re: XPath 1.5? (was RE: typing and markup)


Re:  XPath 1.5? (was RE:  typing and markup)
At 12:35 PM 5/7/2002 -0400, Simon St.Laurent wrote:
> > Please, can we see some queries that cause problems, or things that are
> > hard to say or do in XQuery?
>
>No.  I'm not looking for additional features - I'm looking for fewer
>features.  This isn't a question of particular queries needing
>additional features.

Then could you take some examples out of our specification or use case 
document and argue that people really don't need to do these things, and it 
is a mistake to define a language with this power?

You say you don't like types. Suppose that the user has a document that 
validates according to some schema. In that document, salary is a decimal:

         <person>
                 <name>Jonathan Robie</name>
                 <salary> 3.14 </salary>
         </person>

         <person>
                 <name>Uche Ogbuji</name>
                 <salary>  2341235.34 </salary>
         <person>

The schema tells me that name is a string and salary is a decimal. The user 
created data using this schema, and the user knows full well that salary is 
a number and name is not.

I would like the following query to succeed:

         avg( input()//person/salary )

I would also like indexes to be able to make such queries fast, to enable 
appropriate sorting based on an index. I would like the following to be 
efficient:

         //person sortby (salary)

That means that I want persistent systems to use the type information for 
indexing.

I would like the following query to fail:

         avg( input()//person/name )

I would like it to fail without forcing me to execute the query. That's 
what we call static typing. This query is simply wrong, and a query 
processor can know that.

So far, when we have said things like this, you have responded with 
position statements - XML is a representation, and is not about philosophy. 
Don't you think that users have notions of types, and that users believe 
that salaries can be averaged but names can not? Why is it wrong for XML 
processing to act in accordance with what most users will expect?

Jonathan


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.