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

Re: Partyin' like it's 1999


Re:  Partyin' like it's 1999

Elliotte Harold wrote:
> Joe English wrote:
> > When I complain about namespaces, it's just the opposite:
> > I *don't* want to have to use URI/localname pairs everywhere.
> > I'd rather treat element type names and attribute names
> > as simple, atomic strings.  This is possible with a sane API,
> > but most XML APIs aren't sane.
> >
>
> Interesting. What would such a sane API look like? Are you envisioning
> something more along the lines of XPath/XQuery/XSLT where the program
> has its own list of namespace bindings that it uses to transparently
> resolve qualified names?

Pretty much, yeah.  The basic idea is, the application declares
each of the namespaces it's interested in along with their
preferred prefixes.  Then when a document is parsed, element
and attribute names are rewritten to use the application's
namespace prefix bindings.  This gives application authors
the same kind of convenient shorthand that the Namespaces REC
gives document authors.

There are a couple issues like what to do with the original
namespace declarations (keep them?  transform them?  throw
them out?) and namespaces that the application didn't declare,
but those are minor and easily dealt with.

> Or are you thinking more of something like
> DOM1/SAX1 that pretty much ignores namespace bindings?

What I tend to use nowadays when I have to handle
namespaced documents is a SAX1-equivalent for parsing,
followed by a "namespace sanitizer" that does the above
transformation, followed by a DOM1-equivalent [*] for
the bulk of the work.  That keeps the places where I 
have to deal with namespace URIs at the edges of the 
process; in the middle I almost never have to worry 
about them.


--Joe English

  jenglish@f...

[*] Equivalent in the sense that element and attribute names
    are atomic strings instead of URI/localname pairs or
    URI/localname/prefix triples, not equivalent in the
    sense of having all the features (mis- and otherwise)
    of DOM Level 1.

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.