[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
Joe English wrote:

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

What concerns me about this approach is that somewhere there needs to be 
a namespace cache, and this object needs to be global or passed to each 
method that needs to handle namespaces. Plus you're going to want 
different caches for different documents, so you need to find the right 
cache. Maybe you can store it in the Document object itself, but what if 
the namespaces change from one scope to the next? I suspect this is 
going to produce really ugly code in traditional languages like C# and 
Java. But maybe I'm wrong. If somebody could figure out how to design 
this in a clean way, it would be interesting to see.

Languages like XPath/XQuery/RNC have the advantage of being able to 
build in their own namespace mappings as syntax features, rather than 
having to graft this on to objects somewhere. So when you get to write 
the entire language, I think you can make this work. But to convince me 
this could work in Java/C#/Python/Perl etc., you're going to need show 
me an API that uses qualified names instead of local names and URIs that 
works and is at least as clean as existing APIs.

-- 
Elliotte Rusty Harold  elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.