Better access to APIs in paths (was Re: [Zope3-dev] needing viewsclues - template/title troubles)
Stuart Bishop
zen@shangri-la.dropbear.id.au
Tue, 25 Feb 2003 07:06:08 +1100
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.
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?
--
Stuart Bishop <zen@shangri-la.dropbear.id.au>
http://shangri-la.dropbear.id.au/