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

RE: Re: XPath incompatibilities

Subject: RE: Re: XPath incompatibilities
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Thu, 03 Jan 2002 17:23:45 +0100
smaller operator in xpath
"Michael Kay" <michael.h.kay@xxxxxxxxxxxx> wrote:
> (Another
> option that's on the table is that we never interpret "<" as a lexicographic
> comparison, forcing the user to use the compare() function instead, or
> perhaps the new "lt" operator.).

Just my 2 cents:
- Overloading operators (and functions) too much is not a good idea,
 especially if some of the overloaded semantics is not as widely used
 as others (counting other contextes as well). While using "<" for
 numeric comparisions seems to be commonplace, i don't recall that
 it is widely used for string  comparisions  (even the C++ standard
 libraries don't do that).
 I'd like to see a compare() function, especially because such a
 function is needed anyway for additional parameters in case you want
 to specify a locale or language or such which influences the
 comparision.
- Keep the number of operators small. Operators have to be in the
 grammar, and grammars aren't that easy to keep modular. Keeping
 the grammar small by using operator precendences and association rules
 doesn't avoid the problem, these tables aren't that easy to  keep
 modular either. Functions are much easier to separate into different
 modules/packages/whatever.
- Don't overuse operators consisting of letters, even (or especially)
 if they are words. There is a lot of potential of having them confused
 with other names (unless you make them completely reserved identifiers,
 hardly an option here).
 Especially don't invent a "lt" operator, or any other operator with
 the same name as one of the auto-predefined XML entities (unless you
 want to answer all the newbie questions why they sometimes have to
 write "&lt;" and sometimes "lt" to avoid runtime errors... :-)
 
Regards
J.Pietschmann

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


Current Thread

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
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.