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

Re: Should one adopt the tag naming convention of anexisting X

  • From: Uche Ogbuji <uche@ogbuji.net>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 6 Feb 2012 09:12:41 -0700

Re:  Should one adopt the tag naming convention of anexisting X
On Mon, Feb 6, 2012 at 8:57 AM, Cox, Bruce <Bruce.Cox@uspto.gov> wrote:

WIPO Standard ST.36, vocabulary for patent documents, uses hyphen separators rather than underscore or camel case.  Java developers have frequently complained of this, since the hyphen is apparently a reserved character in Java and their tools for automatically creating classes stumble over them when used in element names, requiring manual intervention, or other cleanup actions (so I’m told). 

 

Is the Java objection real?  Is there any real technical reason to prefer one over the other?


Having written a data binding tool [1] from XML to a language with similar identifier rules as Java's, I can say that sure there is a technical obstacle.  However, this technical obstacle is the least one would expect when trying to automate correspondences between one technical context and another, very different technical context. People who use this as an excuse for insisting on CamelCase in XML are either omitting or just fudging the fact that it's the least of the issues they have to deal with. According to such objections, they couldn't use XML namespaces at all (the colon has the same problem as the hyphen), nor even the original, pre-namespace idea of the likes of xml:space and xml:lang.

Such objections also, as I've argued in this thread, get the balance of utility wrong. It is the job of the developer to deal with such things without imposing restrictions for his own convenience on the user space. If some of us (you and I, and a lot of other users I've encountered) prefer the hyphens to the CamelCase, then the debate should have nothing to do with programming at all. It should only be about usability for end users. If we programmers can't process the more usable options, that's our own fault in this particular case, because a mechanical conversion from one naming convention to the other is always possible.

 

 Personally, I find hyphenated element names easier to read than camel case, and vastly easier to type than underscores. 

 

In general, I’m in the same camp as many others with regard to the source of element names: the business vocabulary takes precedence.  We also try to follow ISO 11179-5, but where there is the slightest chance the results will confuse or snag the business users, we break those rules without hesitation.


Sensible.

[1] http://www.xml.com/pub/a/2005/01/19/amara.html

--
Uche Ogbuji                       http://uche.ogbuji.net
Weblog: http://copia.ogbuji.net
Poetry ed @TNB: http://www.thenervousbreakdown.com/author/uogbuji/
Founding Partner, Zepheira        http://zepheira.com
Linked-in: http://www.linkedin.com/in/ucheogbuji
Articles: http://uche.ogbuji.net/tech/publications/
Friendfeed: http://friendfeed.com/uche
Twitter: http://twitter.com/uogbuji
http://www.google.com/profiles/uche.ogbuji


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.