XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Best practice for XSD enumeration values?

Hi Folks,

This simpleType has a list of enumeration values:

<xs:simpleType name="AirportType">
    <xs:restriction base="xs:string">
        <xs:enumeration value="active civil airport" />
        <xs:enumeration value="active military airport" />
        <xs:enumeration value="active joint (civil and military)" />
        <xs:enumeration value="active airport having permanent type surface runways" />
    </xs:restriction>
</xs:simpleType>

What do you think about those enumeration values? Good? Bad?

A colleague told me: Whitespaces in enumeration values are evil." Do you agree? On the one hand, whitespace enables a value to be easily read. On the other hand, when someone is creating an XML document they might accidentally insert two spaces between words, thus yielding invalid data. Whitespaces good or bad?

The same colleague recommended slamming the words together, and uppercase the first letter of following words, e.g., change "active civil airport" to "activeCivilAirport". But what about values with punctuation such as this value "active joint (civil and military)"? Slamming those words together will create a mess. Should punctuation be prohibited in enumeration values?

This is a pretty long enumeration value: "active airports having permanent type surface runways". Are long values bad? Is there a recommended limit to the length of enumeration values?

I am interested in hearing your thoughts on this issue.

/Roger


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


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS