Case conventions on element names?

前端 未结 10 1732
予麋鹿
予麋鹿 2020-12-02 18:00

Are there any formal recommendations on element casing in XML?

I know XHTML uses lowercase element names (as opposed to HTML which canonically uses uppercas

10条回答
  •  再見小時候
    2020-12-02 18:25

    See the UN/CEFACT XML Naming and Design Rules Technical Specification Version 3.0 page 23 for some example rules used in several standards.

    Specifics (from page 23 of Version 3.0 dated 17 December 2009):

    • LowerCamelCase (LCC) MUST be used for naming attributes.
    • UpperCamelCase (UCC) MUST be used for naming elements and types.
    • Element, attribute and type names MUST be in singular form unless the concept itself is plural.

    (other link, Swedish site)

提交回复
热议问题