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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: CamelCase names for XML elements vs. property names for Java bean s

[ Lists Home | Date Index | Thread Index ]
  • From: Ray Waldin <rwaldin@pacbell.net>
  • To: "'xml-dev@ic.ac.uk'" <xml-dev@ic.ac.uk>
  • Date: Tue, 18 Jan 2000 15:58:14 -0800

"Tolkin, Steve" wrote:
> In the BizTalk Framework Document Design Guide
> (http://www.BizTalk.org/Resources/frame081.asp).
>     Names and Cases: Names should use the style called
> "CamelCase." If an element reflects a thing (an object, a class or a
> table name), use UpperCamelCase; if it is a property, a reference,
> etc., use lowerCamelCase.
>     Expressing Data: All simple data (trees, columns, rows, objects,
> properties, etc.) should be expressed as elements and subelements, not
> attributes.

Microsoft has recently changed their examples to use lowerCamelCase attributes
instead of elements for "properties".  Here's the example from the Document
Design Guide you quoted above:

> <PurchaseOrder xmlns=
>   "urn:schemas-biztalk.org:your-namespace/purchaseorder.xml">
> <POHeader> 
> <PONumber>12345</PONumber>
> <PaymentType>INVOICE</PaymentType> 
> <POShipTo>
> <street1>Your Street 1</street1>
> <street2>Your Street 2</street2> 
> <city>Your City</city>
> </POShipTo >
> ...
> </PurchaseOrder>

And here's a similar example from a more recently published BizTalk Framework
Document Specification 1.0 
(http://206.132.62.135/Biztalk%20Framework%20Document%20Specification%201.0.doc): 

> <PO xmlns="x-schema:http://schemas.biztalk.org/BizTalk/cfwau8qx.xml">
>   <POHeader
>     refPromise="0"
>     fromCust="111111111"
>     poNumber="PO# 12345"
>     description=""
>     paymentType="INVOICE"
>     shipType="AIR1D" />
>   <Contact
>     contactName=""
>     contactPhone=""
>     contactEmail="" />
>   <POShipTo
>     street1="200 Smith Rd"
>     street2=""
>     street3=""
>     street4=""
>     attn="Bob Smith"
>     city="Anytown"
>     stateProvince=""
>     postalCode="54321"
>     country="USA" /> 
> ...
> </PO>

Personally, I prefer UpperCamelCase for both element and attribute names.

-Ray

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
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