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

Re: Lessons learned from the XML experiment

  • From: Uche Ogbuji <uche@ogbuji.net>
  • Date: Thu, 14 Nov 2013 10:04:57 -0700

Re:  Lessons learned from the XML experiment
On Thu, Nov 14, 2013 at 9:48 AM, Pete Cordell <petexmldev@codalogic.com> wrote:
Surely Java is not broken because it has tools to support that
'convention'. XML is broken as far as this convention is concerned because
there are no (widely available) tools that implement it.


What do you mean by "implement" here, because as I understand the term
*every* XML tool implements it just fine.

XML tools work quite well using XML namespaces when you have nested vocabularies (potentially not under your control) which have the same local name, e.g.:

<p:person xmlns:p='http://example.com/person'>
   <e:employer xmlns:e="http://example.com/employer">
       <e:name>Megaco</e:name>
   </e:employer>
   <p:name>Fred Blogs</p:name>
</p:person>

Here, each instance of name is easily identified as unique.  You have to work harder with existing tools if the XML is something like the following:

<com.example.person>
   <com.example.employer>
       <name>Megaco</name>
   </com.example.employer>
   <name>Fred Blogs</name>
</com.example.person>

What actual problem do you think the first example solves better than the second?  I'd have no problem processing the second with any XML tool I like. Although I'd never design XML like that. What on earth is wrong with the following?
 
<person>
   <employer>
       <name>Megaco</name>
   </employer>
   <name>Fred Blogs</name>
<person>

That's just as easy to process, and has the bonus of being easier to read.

--
Uche Ogbuji                                       http://uche.ogbuji.net
Founding Partner, Zepheira                  http://zepheira.com
Author, Ndewo, Colorado                     http://uche.ogbuji.net/ndewo/
Founding editor, Kin Poetry Journal      http://wearekin.org
Editor & Contributor, TNB     http://www.thenervousbreakdown.com/author/uogbuji/
http://copia.ogbuji.net    http://www.linkedin.com/in/ucheogbuji    http://twitter.com/uogbuji


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