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

Case of function names (Was: Re: comments on December

Subject: Case of function names (Was: Re: comments on December F&O draft)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sun, 6 Jan 2002 18:42:24 +0000
xsl gmonthday date compare
David Carlisle wrote:
> 6
> I think that all new functions should match the existing xpath
> naming convention, ie lowercase - separated words. When mapping
> names from other languages that have other naming conventions (eg
> camel case) then some extra - may need to be added, and the names
> lowercased. so I thing dateTime should be date-time throughout
> gMonthDay should be g-month-day etc.
> especially bad is captial c in get-Century but lowercase h in
> get-hour

I think that you could argue it both ways when the function name
includes the name of a relevant data type from XML Schema, since those
data type names use camel case. It depends on whether you think people
will be more confused by the naming conventions of functions being
unpredictable or by not using the same naming convention when
referring to the built-in data types within function names as you do
when referring to them elsewhere.

Also, the problem with adopting standard XPath naming conventions for
these functions is especially evident when you compare:

 - xf:ID()    and  xf:id()
 - xf:IDREF() and  xf:idref()
 - xf:Name()  and  xf:name()

However, perhaps this issue could be side-stepped by not using
functional syntax for constructors.

I agree completely about xf:get-Century-from-dateTime() and
xf:get-Century-from-date - Century is not an XML Schema data type, so
there's no justification for it being capitalised.



Jeni Tennison

 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.