This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]