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

Shane Hathaway shane@zope.com
Mon, 24 Feb 2003 13:50:31 -0500


Troy Farrell wrote:
> Wow.  I had no idea that I started a thread...  I read the list in 
> digest mode, so I'm now seeing the damage ;)
> 
> I'm glad to bring this to your attention and I look forward to seeing 
> the resolution.  All I can say so far is that I like the idea of keeping 
> scripters from dealing with ++ and @@.  The tal:namespaces is kind of 
> neat, though could also seem strange in xml:
> 
> <?xml version="1.0"?>
>   <dailyverse verion="0.5"
>               xmlns="http://studyshare.net/dailyverse/"
>               xmlns:tal="http://namespaces.zope.org/tal"
>               tal:namespaces="zope http://namespaces.zope.org/zope">
>     <verse tal:content="here/zope:this_that_and_the_other"/>
>   </dailyverse>
> 
> Nah.  Nevermind.  It looks fine :)  I'll be reading.  Thanks for all 
> your effort.

I think there might be some default namespaces (set up via 
configuration).  You can override the default namespaces in your 
template if you wish to be more explicit.

An option is to reuse xmlns:foo attributes as declarations of namespaces 
for both the TAL interpreter and the client.  So you could write the 
above like so:

    <dailyverse verion="0.5"
                xmlns="http://studyshare.net/dailyverse/"
                xmlns:tal="http://namespaces.zope.org/tal"
                xmlns:zope="http://namespaces.zope.org/zope">
      <verse tal:content="here/zope:this_that_and_the_other"/>
    </dailyverse>

But then the client sees the xmlns:zope declaration, which it probably 
doesn't need.  So even if we reuse xmlns attributes, I think 
tal:namespaces has value for declaring namespaces that only the TAL 
interpreter is meant to use.

> One other thing comes to mind.  I know that you develop all these things 
> with specific target audiences in mind.  I just thought I'd mention how 
> I've tended to approach software.  I start out as your basic user, then 
> migrate to greater understanding (maybe power user), then finally on 
> toward adminstrator and eventually developer.  Sooner or later, I'll be 
> getting into the guts to build products, but I (like most people) like 
> to get the "quick and easy Hello World" stuff done first.  Hence my 
> initial email...

That's what most people do, so your input is useful.  Thanks.

Namespaces appeal to me in this context because you already have to be 
aware of namespaces in order to write page templates (and, in the 
not-too-distant future, XHTML).  So this proposal would let new users 
move forward without learning many new concepts.

Shane