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

Re: Engineering versus Science, Anecdote versus Evidence... [W

  • From: Andrew Welch <andrew.j.welch@gmail.com>
  • To: John Cowan <cowan@mercury.ccil.org>
  • Date: Wed, 4 Jan 2012 15:59:22 +0000

Re:  Engineering versus Science
> Indeed it is.  However, at the mundane level of style guides, Google
> actually has a particularly fine style guide for the design of XML
> documents which they grossly ignored in this case.  Bad, bad Google.
>
> Disclaimer: I call it "particularly fine" because I wrote it, with
> contributions from lots of people who were also at Google at the time.
>
> http://google-styleguide.googlecode.com/svn/trunk/xmlstyle.html

Point 5.1 is interesting:

"All elements MUST contain either nothing, character content, or child
elements.  Mixed content MUST NOT be used.  [Rationale: Many XML data
models don't handle mixed content properly, and its use makes the
element order-dependent.  As always, textual formats are not covered
by this rule.]"

I'm guessing you mean don't use mixed content for data centric xml?

Also 5.2

"XML elements that merely wrap repeating child elements SHOULD NOT be
used.  [Rationale: They are not used in Atom and add nothing.]"

They really are helpful  - I'm having to process xml like this at the
moment and it is a bit tedious, as typically the output will have some
form of wrapper.  For example given:

<item>a</item>
<item>b</item>

to output that as a html list:

<ul>
  <il>a</li>
  ...

you need to create the wrapper <ul> on the first occurrence of <item>,
then process the rest from there.

If there was an element <items> that merely wrapped the <item>s :)
then it would make life a bit easier.



-- 
Andrew Welch
http://andrewjwelch.com


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


PURCHASE STYLUS STUDIO ONLINE TODAY!

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