OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Hyphens vs underscores in element names

[ Lists Home | Date Index | Thread Index ]
  • From: "KenB" <KenB@bristol.com>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 26 Jan 2000 09:09:54 -0500


You wrote:

One of the more popular arguments between the development team for
FieldML regards a convention for the naming of elements and
attributes in our ML collection. The debate focuses over whether
we should use underscores (num_elements), hyphens (num-elements),
capitalisation (numElements) or runtogether (numelements). We've
eliminated capitalisation and runtogether because they don't
look as nice, and are now reduced to hyphens vs. underscores. The
older part of the development team is familiar with Fortran and C
and are keen to use underscores. However I've noticed in a brief
survey (results below) that most of the W3C-endorsed stuff seems
to feature minus signs.

Can anyone suggest any compelling reasons for going either way?
Does anyone want to add more data to my survey?


>> The most compelling reason to go with undercore is the C/C++and other
languages
>> issue.  Its not just a matter of compilers.  There are a lot of new tools on
the
>> horizon that are/will be dealing with XML schemas and programming code.
These
>> tools will need to share symbol tables between the programming language and
>> the element/attribute names.  This is a lot easier if you don't have to
change
>> element tags programmatically to something that the language compilers will
>> like.

>> For example, its cool to have a code browser be able to click on an element
tag
>> and automatically jump directly to the C++ class that implements that tag.
In
>> eXactML, we clean up any XML tags that are not valid C++/Java symbols when
>> we generate the output code.  This works fine, but symbols that have to be
>> scrubbed can't take as much advantage of VC++ navigation.

>> Its a pretty minor nit, but if its a simple choice of keeping symbols
friendly to both
>> environments, then thats the way to go.

Ken Blackwell
Bristol





xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Unsubscribe by posting to majordom@ic.ac.uk the message
unsubscribe xml-dev  (or)
unsubscribe xml-dev your-subscribed-email@your-subscribed-address

Please note: New list subscriptions now closed in preparation for transfer to OASIS.






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS