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

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

  • From: Ray Waldin <rwaldin@p...>
  • To: "'xml-dev@i...'" <xml-dev@i...>
  • Date: Tue, 18 Jan 2000 15:58:14 -0800

xml vs properties
"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 

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


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
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.


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.
First Name
Last Name
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.