[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
> 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, e.g. 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|