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

Re: a useful naming convention


xml attribute naming convention
Bryan Rasmussen wrote:

>However reading the KML (Keyhole Markup Language) spec I came across this:
>
>There are two basic types of KML tags: simple and complex. Complex tags are
>easily identified by an initial upper case letter, while simple tags use all
>lower case. Complex tags can function as Parent Tags to both complex and simple
>tags, while simple tags are children only and can contain no other tags.
>  
>
this is maybe hard to maintain over time...and realistically this
information should be conveyed through relation to a schema (IMHO)

I would advocate;

- make clear and semantically correct element/attributes names,
obscuring this with acronyms or with some code convention is reducing
the value of marking up structure, likewise embedding such a convention
will be hard to maintain

- if wanting to delineate type, then use some sort of explicit schema
attribute to do this job

- reuse common attribute names (e.g. id, name, description) where
possible, I find that after designing a few xml markup languages that
after awhile all my attributes tend to come from a group of 10-15 or so
common attributes...seems to scan better once I have established this

- reduce keystrokes....I avoid camelhumps or capitals and tend to use
indenting as primary mechanism for making things easier to read

other then that, multiple namespaces tend to cause a lot of readability
issues...esp the decision of what is default namespace e.g. xmlns=""
versus prefixed namespaces....I am trending over using XHTML as my
ultimate always default namespace, as I reuse it a lot for documentation
these days.

gl, Jim Fuller

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.