Better access to APIs in paths (was Re: [Zope3-dev] needing views
clues - template/title troubles)
Shane Hathaway
shane@zope.com
Mon, 24 Feb 2003 10:00:39 -0500
Stuart Bishop wrote:
> On Monday, February 24, 2003, at 01:23 AM, Jim Fulton wrote:
>
>> context/++view++foo
>> context/@@foo
>> context/++api++title
>> context//title
>> context/++/title
>>
>> Thoughts?
>
>
> For ZPT (which I think deserves a special case because of its target
> audience):
> <h1 tal:content="dc:context/title"/>
> or for a shortcut to the most common case, just
> <h1 tal:content="dc:title"/>
I want to spell it like this:
<html tal:namespaces="dc http://purl.org/dc/elements/1.1/;
zope http://namespaces.zope.org/zope">
<head>...</head>
<body>
<p>The title of this document is
<span tal:content="here/dc:title">Some Title</span>.</p>
<p>Its path in Zope is
<span tal:content="here/zope:path">Some Path</span>.</p>
</body>
</html>
This would be pretty much the perfect syntax IMHO. The use of a colon
in the middle of a path expression is not a problem, since the slash
before the namespace qualifier distinguishes the expression as a path
expression.
It would align well with W3C conventions, at the same time giving us
terse, clean representations of very common operations.
What do others think?
Shane