|
[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 (Was: Re: [x
Hi Mike, > It would mean, for example, that sum(XXX/@value) would not > necessarily give the same answer as sum(XXX/(@value+0)) (where XXX > is an arbitrary expression); though it would give the same answer > 99% of the time, which would make the exceptions even more > surprising. Gah, I see. There's sort of the same kind of thing with: section[keyword = $keyword] and section[starts-with(keyword, $keyword)] and section/keyword[starts-with(., $keyword)] which we have to answer questions about all the time. > After months of agonising on this one, we just decided to keep > things simple: "/" eliminates duplicates and returns results in > canonical order, "for" retains duplicates and retains the ordering > of the operand. I was sad to lose "sum(//rate/(@value * @quantity))" > but I'd rather make it an error than have it return results that > were difficult to explain to people. 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) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|

Cart








