22HTML Templating Mechanisms
33==========================
44
5- :Version: $Revision: 1.7 $
5+ :Version: $Revision: 1.8 $
66
77Current Situation and Issues
88============================
@@ -104,11 +104,12 @@ TALES - TAL Expression Language
104104 that form the tag attribute values. TALES expressions come in three
105105 flavours:
106106
107- Path Expressions - eg. ``foo/bar/frozz ``
107+ Path Expressions - eg. ``item/status/checklist ``
108108 These are object attribute / item accesses. Roughly speaking, the path
109- ``foo/bar/frozz`` is broken into parts ``foo``, ``bar`` and ``frozz``. The
110- ``foo`` part is the root of the expression. We then look for a ``bar``
111- attribute on foo, or failing that, a bar item (as in foo['bar']). If that
109+ ``item/status/checklist`` is broken into parts ``item``, ``status``
110+ and ``checklist``. The ``item`` part is the root of the expression.
111+ We then look for a ``status`` attribute on ``item``, or failing that, a
112+ ``status`` item (as in ``item['status']``). If that
112113 fails, the path expression fails. When we get to the end, the object we're
113114 left with is evaluated to get a string - methods are called, objects are
114115 stringified. Path expressions may have an optional ``path:`` prefix, though
@@ -121,8 +122,9 @@ TALES - TAL Expression Language
121122
122123 Python Expressions - eg. ``python: 1+1``
123124 These expressions give the full power of Python. All the "root level"
124- variables are available, so ``python:foo.bar.frozz()`` might be equivalent
125- to ``foo/bar/frozz``, assuming that ``frozz`` is a method.
125+ variables are available, so ``python:item.status.checklist()`` would be
126+ equivalent to ``item/status/checklist``, assuming that ``checklist`` is
127+ a method.
126128
127129PageTemplates
128130 The PageTemplates module glues together TAL and TALES.
0 commit comments