Premiere version : mise en route du suivi.
[auf_roundup.git] / roundup / cgi / TAL / .svn / text-base / README.txt.svn-base
... / ...
CommitLineData
1TAL - Template Attribute Language
2---------------------------------
3
4This is an implementation of TAL, the Zope Template Attribute
5Language. For TAL, see the Zope Presentation Templates ZWiki:
6
7 http://dev.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage
8
9It is not a Zope product nor is it designed exclusively to run inside
10of Zope, but if you have a Zope checkout that includes
11Products/ParsedXML, its Expat parser will be used.
12
13Prerequisites
14-------------
15
16You need:
17
18- A recent checkout of Zope2; don't forget to run the wo_pcgi.py
19 script to compile everything. (See above -- this is now optional.)
20
21- A recent checkout of the Zope2 product ParsedXML, accessible
22 throught <Zope2>/lib/python/Products/ParsedXML; don't forget to run
23 the setup.py script to compiles Expat. (Again, optional.)
24
25- Python 1.5.2; the driver script refuses to work with other versions
26 unless you specify the -n option; this is done so that I don't
27 accidentally use Python 2.x features.
28
29- Create a .path file containing proper module search path; it should
30 point the <Zope2>/lib/python directory that you want to use.
31
32How To Play
33-----------
34
35(Don't forget to edit .path, see above!)
36
37The script driver.py takes an XML file with TAL markup as argument and
38writes the expanded version to standard output. The filename argument
39defaults to tests/input/test01.xml.
40
41Regression test
42---------------
43
44There are unit test suites in the 'tests' subdirectory; these can be
45run with tests/run.py. This should print the testcase names plus
46progress info, followed by a final line saying "OK". It requires that
47../unittest.py exists.
48
49There are a number of test files in the 'tests' subdirectory, named
50tests/input/test<number>.xml and tests/input/test<number>.html. The
51Python script ./runtest.py calls driver.main() for each test file, and
52should print "<file> OK" for each one. These tests are also run as
53part of the unit test suites, so tests/run.py is all you need.
54
55What's Here
56-----------
57
58DummyEngine.py simple-minded TALES execution engine
59TALInterpreter.py class to interpret intermediate code
60TALGenerator.py class to generate intermediate code
61XMLParser.py base class to parse XML, avoiding DOM
62TALParser.py class to parse XML with TAL into intermediate code
63HTMLTALParser.py class to parse HTML with TAL into intermediate code
64HTMLParser.py HTML-parsing base class
65driver.py script to demonstrate TAL expansion
66timer.py script to time various processing phases
67setpath.py hack to set sys.path and import ZODB
68__init__.py empty file that makes this directory a package
69runtest.py Python script to run file-comparison tests
70ndiff.py helper for runtest.py to produce diffs
71tests/ drectory with test files and output
72tests/run.py Python script to run all tests
73
74Author and License
75------------------
76
77This code is written by Guido van Rossum (project lead), Fred Drake,
78and Tim Peters. It is owned by Digital Creations and can be
79redistributed under the Zope Public License.
80
81TO DO
82-----
83
84(See also http://www.zope.org/Members/jim/ZPTIssueTracker .)
85
86- Need to remove leading whitespace and newline when omitting an
87 element (either through tal:replace with a value of nothing or
88 tal:condition with a false condition).
89
90- Empty TAL/METAL attributes are ignored: tal:replace="" is ignored
91 rather than causing an error.
92
93- HTMLTALParser.py and TALParser.py are silly names. Should be
94 HTMLTALCompiler.py and XMLTALCompiler.py (or maybe shortened,
95 without "TAL"?)
96
97- Should we preserve case of tags and attribute names in HTML?