[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
"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@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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|