[Zope3-dev] Re: Better access to APIs in paths (was Re:needingviewsclues - template/title troubles)

Shane Hathaway shane@zope.com
Thu, 27 Feb 2003 23:40:15 -0500 (EST)


On Thu, 27 Feb 2003, John D. Heintz wrote:

> Shane,
> 
> I'm trying to understand what you are referring to below, there are
> three ways of doing these kind of things right?
> 
> 1) URIs. This implies that somewhere else a URI -> implementation
> mapping exists.
> <span talns:dc="http://purl.org/dc/elements/1.1/">
>   <p tal:content="context/dc:title"></p>
> </span>
> 
> 2) Magic. This is what you are writing about below, right? The prefix
> "dc" is magically assigned to a component by the environment.
> <p tal:content="context/dc:title"></p>
> 
> 3) XSLT Extension functions. This directly identifies the adapter that
> gets used.
> <span talns:dc="zope.app.interfaces.dublincore.IZopeDublinCore">
>   <p tal:content="context/dc:title"></p>
> </span>

That's about right.  At this stage, #1 and #3 are about the same, since
they both allow URI-bound namespaces (though I would use some kind of
protocol identifier for the namespace in #3).  #2 is okay if the "dc"  
prefix maps to a default URI.  #2 is not okay if the "dc" prefix maps
directly to a component.

Shane


> 
> Thanks,
> John
> 
> On Wed, 2003-02-26 at 09:36, Shane Hathaway wrote:
> > 
> > If prefixes map directly to components or interfaces, the new syntax is 
> > really specific to Zope.  Every time you want to create a new API, you 
> > have to be sure no one else has staked a claim to the prefix you want. 
> > Even if you're using page templates outside Zope, you have to be sure no 
> > one in the Zope community has taken your prefix, because you might want 
> > to interoperate with Zope someday, and you don't want to change your 
> > prefix.  So effectively, all the namespaces are centralized and 
> > controlled by Zope.  That could be a problem for interesting prefixes 
> > with ambiguous meanings like "workflow", "versions", "api", "db", etc.
> > 
> 
> 
> 
>