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

RE: infinite depth to namespaces

  • From: Don Park <donpark@d...>
  • To: xml-dev@l...
  • Date: Thu, 30 Aug 2001 15:43:54 -0700

use of default namespace
Simon Said:
> Simple best-practice solutions are fairly easy to come up with, but
> seemingly just as easy to shoot down, suggesting that there may never be
> consensus on these issues.

I share your frustration Simon.  What we need is to give a clearly outlined
shape to the best-practice solutions for namespaces.  One can do a lot of
weird things with namespaces, but one must also have a good sense of what
the normal use of namespace is.  In mystic words, you must have a center
before you can have fringes.

Last year, I designed a payment authentication message format which used
XML-Signature.  Because some of the system component (provided by another
party) didn't have namespace support and because I wanted to minimal
namespace handling headaches, I made primary (payerauth) elements
namespace-less and required default namespace delcaration for XML-Signature
elements.  Result looked like this:

  <paymentResponse>
    ...
    <Signature xmlns="....">...</Signature>
  </paymentResponse>

Above message can be validated and processed without being aware of
namespaces, so I had achieved my goals regarding namespaces.  In retrospect,
I should have required use of default namespace declaration for primary
elements too so it would look like this:

  <paymentResponse xmlns="blahblah">
    ..
    <Signature xmlns="...">...</Signature>
  </paymentResponse>

This removes the need to understand namespace-less elements and prevents
'naive' architecture changes like making Signature elements namespace-less
also.  Alas, its too late since the spec went thru a major revision without
my participation.  Some valuable features like 'required Canonical XML use'
and 'formfeed document separator' were also removed.

Lessons I learned are:

1. be wary of introducing concepts that attract abuse
2. fully discuss and justify important features in the spec.

Default XML namespace concept is simple to understand, but 'no-namespace'
concept is even simpler and easy to abuse.  Unjustified features are like
trees with shallow roots.  Chances are they will get washed out in the next
storm if you are not there to hold them in place.

Best,

Don Park
Docuverse


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.