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

Re: Friendly names in XML Schema best practice?


friendly names
Jeff,

Addressing the "friendly" names portion of your question: I always use
the ISO/IEC 11179 standard [1] for XML element naming in the schemas I
develop in the U.S. federal government space. 11179 pre-dates XML, its
focus being data elements; however, the concepts are very applicable to
XML elements. In summary, Part 5 ("Naming and Identification Principles
for Data Elements") of ISO/IEC 11179 uses a multi-part naming convention
for data element names.

DATA ELEMENT NAME PARTS:

The primary parts are:

- Object Class : Represents an activity or object in a context.  It
essentially answers the question "What is this data element about?"

* Examples: Organization, Address, Project

- Property Term : Further distinguishes the data element from other data
elements of the same Object Class. 

* Examples: Name, City, Start (may seem nebulous - please read on)

- Representation Term: Describes the representation format of a data
element.

* Examples: Text, Date, Code, Amount

COMPLETE DATA ELEMENT NAMES:

Joining these example data element names in the order given yields the
following complete data element names:

- OrganizationNameText (the "Text" term is typically dropped in schemas)
- AddressCityText
- ProjectStartDate

QUALIFIERS:

There will be occassions in which these 3 parts are not sufficient -
that's where Qualifiers come in. Qualifiers can be added in front of an
Object Class, a Property Term, or both - for example:

- OfficeAddressCityText ("Office" is a Qualifier for the "Address"
Object Class)

* This could be done to differentiate this data element from one named
HomeAddressCityText;

- OrganizationShortNameText ("Short" is a Qualifier for the "Name"
Representation Term)

* This could be done to differentiate this data element from one named
OrganizationLongNameText;

- InternalProjectProposedStartDate ("Internal" is a Qualifier for the
"Project" Object Class, "Proposed" is a Qualifier for the "Start"
Representation Term)

* This could be done to differentiate this data element from one named
ExternalProjectApprovedStartDate, or ExternalProjectProposedStartDate;

NAMING PROCESS:

The process I usually use when creating data element names is:

(1) Begin with the 2 "outer" parts (Object Class and Represention Term)

(2) Determine what Property Term would be most appropriate

(3) Ask yourself if the data element name is clear/unique enough for
your purposes (i.e. is there already a data element with that name)

(4) If so, apply Qualifier terms

IN CLOSING:

This approach is used throughout the U.S. federal government, as well as
by emerging XML vocabularies such as OASIS UBL [1].

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton

[1] http://metadata-stds.org/11179
[2] http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=ubl

Jeff Rafter wrote:
> 
> I was curious if anyone had experience decorating XML Schemas (or any other
> schemas for that matter) with "friendly" names. That way, when importing
> schemas into editors for non XML users they are presented with something
> even more understandable. Additionally, if this has been done, has anyone
> seen it done in combination with xml:lang to specify language specific
> identifiers. I would imagine that it would go inside of <appInfo> inside
> something like <friendlyName xml:lang="en-US">.
> 
> To add even more to this question, has anyone seen the use of language
> identifiers within the documentation element?
> 
> Thanks,
> Jeff Rafter
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
begin:vcard 
n:Chiusano;Joseph
tel;work:(703) 902-6923
x-mozilla-html:FALSE
url:www.bah.com
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
version:2.1
email;internet:chiusano_joseph@b...
title:Senior Consultant
fn:Joseph M. Chiusano
end:vcard

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.