- 31 Jan, 2001 4 commits
-
-
Christopher Petrilli authored
-
Guido van Rossum authored
discussed in today's meeting.
-
Guido van Rossum authored
-
Guido van Rossum authored
- Don't use a wrapper function around macroIndexer.
-
- 30 Jan, 2001 9 commits
-
-
Christopher Petrilli authored
-
Guido van Rossum authored
-
Guido van Rossum authored
Running the test suite with this version ("./runtest.sh -c") now shows two failures: - test2: the checked-in test output is missing the xmlns="..." attributes because the Printer module doesn't emit these for prefix-less xmlns attributes (in cases where node.namespaceURI is set but node.prefix is None). - test8: this version emits a redundant xmlns:m attribute on the expanded macro element. AFAICT this is OK according to the XMLNS standard. The redundant attribute is emitted because macros are compiled without context (since they may be used in a different context).
-
Guido van Rossum authored
- Added (untested) insertStructure().
-
Guido van Rossum authored
(by applying str() if it is neither).
-
Tres Seaver authored
-
Guido van Rossum authored
-
- 29 Jan, 2001 19 commits
-
-
Guido van Rossum authored
- z:omit is gone - new, separate command to loop over a subtree: <tag z:repeat="var expr"> - remove syntactic sugar from z:define (no "as"), z:attributes (no "=") TALInterpreter needed no change. Note that TALCompiler doesn't yet emit proper xmlns attributes.
-
Guido van Rossum authored
-
Guido van Rossum authored
- z:omit is gone - new, separate command to loop over a subtree: <tag z:repeat="var expr"> - remove syntactic sugar from z:define (no "as"), z:attributes (no "=") - refactored a bit to accommodate this
-
Guido van Rossum authored
next version of the syntax.
-
Guido van Rossum authored
status 0.
-
Christopher Petrilli authored
-
Christopher Petrilli authored
-
Guido van Rossum authored
-
Guido van Rossum authored
TALVisitor.
-
Guido van Rossum authored
getAttributeNodeNS(). - Move parseAttributeReplacements() and splitParts() out of the class (they can be simple functions), so they can be imported by TALCompiler and TALInterpreter. - Remove a redundant key argument from doReplaceLoop() and doInsertLoop(). - Add an XXX comment warning that we don't check for z:replace on the documentElement.
-
Guido van Rossum authored
This really makes a difference! Some timing statistics (on test/test2.html, a document with no TAL contents): talizetree : 2.190 secs for 10 calls, i.e. 219 msecs per call printtree : 2.870 secs for 10 calls, i.e. 287 msecs per call compiletree : 0.250 secs for 10 calls, i.e. 25 msecs per call interpretit : 0.110 secs for 10 calls, i.e. 11 msecs per call There are two ways to go from a DOM tree to text (the assumption is that the DOM tree is already in memory): talize + print : total 506 msec compile+interpret : total 36 msec, or about 14x faster If we cache the compiled program, we're down to 12 msec, or over 40x faster. So compilation + interpretation are well worth it! (I.o.w., creating a DOM tree is very slow.)
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Christopher Petrilli authored
-
Guido van Rossum authored
- Recognize command line options.
-
Chris McDonough authored
-
- 27 Jan, 2001 3 commits
-
-
Guido van Rossum authored
then checking whether it is true. (Should be slightly faster.) - Use getAttributeNodeNS() to check for z:omit="" properly.
-
Guido van Rossum authored
-
Guido van Rossum authored
- The DOMVisitor class is simplified a bit; it doesn't visit attributes for you and it doesn't define endVisitElement(). - The CopyingDOMVisitor class is fixed to cope with this; instead of endVisitElement() it defines and uses backUp(), with the same purpose. It defines and uses copyAllAttributes() and copyAttribute() to deal with attributes. - The TALVisitor class is refactored so that the processing of METAL and TAL attributes is done more orderly (I discovered getAttributeNS() :-). - Used a different way to split parts into semicolon-separated parts with doubling used to quote semicolons. - Sped up the macro indexer by using a recursive function with an explicit argument rather than a visitor class. - Added a slot indexer that works the same way. (The macro and slot indexers have a lot in common, but they're still so small that I didn't bother factoring it out. Later.) - The runtest.sh script now takes optional command line arguments (full pathnames of testfiles) to specify a set of tests to run. - The timer.py script was adapted to use the new macroIndexer().
-
- 26 Jan, 2001 5 commits
-
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
returns a tuple (doc, localName) where doc is a DOM tree, or None if the current DOM tree should be searched, and localName is the name of the macro inside that tree.
-
Christopher Petrilli authored
-