Better access to APIs in paths (was Re: [Zope3-dev] needing viewsclues
- template/title troubles)
Jim Fulton
jim@zope.com
Mon, 24 Feb 2003 15:20:25 -0500
Stuart Bishop wrote:
>
> On Tuesday, February 25, 2003, at 02:13 AM, Shane Hathaway wrote:
>
>> I also want to clarify that in this syntax, you're not allowed to use
>> a namespace qualifier for the first name in the path. The first name
>> must be a local or global variable (just like today). So
>> "dc:context/title" is not allowed, but something like
>> "context/zope:services/events/dc:title" is allowed and probably > common.
>
>
> I originally started with "context/dc:title", but added more magic by
> making the namespaces map to a ZPT expression type (so it could be
> done). But this is probably silly since you then have to make sure so
> twonk tries to to map XPATH to the 'path' prefix... Although
> tal:content="dc:title" looks nicer... so I'm confused.
I think it looks worse. You use the explict use of context. This is
too much like DTML magic namespaces.
> One issue I just thought of - how does this map to METAL? If we allow
> the 'namespace prefixes' to be changed
> in the TAL, this could change the interpretation of the macro so that
> instead of the Dublin Core title being
> rendered, some other bit of metadata called title is. Is this a feature?
Let's spend any more time on allowing api namespaces in the first
path position. Consider this an edict. :)
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org