[Zope3-dev] Re: Better access to APIs in paths

Shane Hathaway shane@zope.com
Fri, 28 Feb 2003 08:11:30 -0500


On 02/28/2003 07:41 AM, Jean Jordaan wrote:
>>> the usual solution is to use unenforced
>>> conventions, like never mapping the "tal" prefix to something other 
>>> than the TAL URI.  
> 
> 
> Actually, as long as the namespace used for TAL in the documents
> in question resolved to the TAL URI, it wouldn't matter if it were
> mapped to something different. If you needed to integrate your
> ZPT's with Three Acronymn Letter XML you might have to write ZPTs
> where you use another namespace for ZPT TAL:
> 
> xmlns:zopetal="http://xml.zope.org/namespaces/tal"
> xmlns:tal="http://other/entity/we.dont.control.but.need.to.parse"
> 
> And other people would still be able to reuse your templates, as
> your templates define their own namespaces, that resolve to the
> same common resources as those of the people using your templates.
> 
> Zope can have permanent default URI (-like things) for its common
> namespaces.
> 
> </thinking aloud>
> 
> Shane, you'll yell when I'm misrepresenting your position, right?

You're right on.  In fact, by mapping the TAL namespace to "zopetal", 
you demonstrated how to gracefully resolve conflicting prefixes without 
causing confusion for template maintainers.  I also liked your reasoning 
on dealing with conflicts the same way as XML namespaces.  I'll see if I 
can fit it in my proposal.

Shane