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

RE: For expressions and / operator in XPath 2.0

Subject: RE: For expressions and / operator in XPath 2.0
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 3 Jan 2002 09:28:44 -0000
xml queries and operator
> It's a shame. I do dislike all the keywords that seem to have infected
> XPath, which make it seem more like a programming language in its own
> right than a simple expression language :( I don't suppose we could
> get rid of this one and use some kind of symbol or operator instead,
> like:
>   //rate -> (@value * @quantity)

Yep. We've certainly now got a rather idiosyncratic mix of syntactic styles:
essentially the old path syntax, based on the same kind of thinking as
regular expressions (terse, readily understood by experts, total gibberish
to anyone else), mixed in with an SQL-style keyword syntax. I suspect this
was inevitable, even without the XML Query input: we were running out of
ASCII characters.

I did at one stage suggest using backslash for a sequence mapping operator

   //rate \ (@value * @quantity)

and I've never had so many rotten tomatoes thrown at me in my life! (It
seems 90% of Microsoft users, which means 80% of the world population, are
incapable of distinguishing "/" from "\").

Another proposal was a simplified FOR expression without range variables,

   for //rate return (@value * @quantity)

but this gets into reserved-word parsing problems.

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
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.