annotate examples/bench/kid/base.kid @ 744:cd6624cf2f7c trunk

Lots of `Transformer` cleanup: - Content-insertion transformations (before, after, etc.) now accept a callable. - `.prepend()` now ''only'' operates on elements. Previously it also operated on `OUTSIDE` marked events. - Where it makes sense, transformations are now ''consistently'' applied to individually selected objects in the document, rather than on any contiguous selection. This means that adjacent selected elements will be treated individually rather than as a whole. - Transformations should now consistently work on the context node. - `.substitute()` now defaults to a count of 0 (ie. all) rather than 1. This is to be consistent with Python's regex substitution. - `ATTR` events now have a `kind` of `ATTR` in addition to having this as their `mark`. - Added the `BREAK` `mark`. This allows cuts of otherwise seamlessly joined objects to be operated on. - Added a full test suite.
author athomas
date Mon, 09 Jun 2008 06:39:46 +0000
parents c40a5dcd2b55
children
rev   line source
57
300b6a3b0730 Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff changeset
1 <html xmlns="http://www.w3.org/1999/xhtml"
300b6a3b0730 Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff changeset
2 xmlns:py="http://purl.org/kid/ns#">
69
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
3
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
4 <p py:def="greeting(name)">
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
5 Hello, ${name}!
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
6 </p>
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
7
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
8 <body py:match="item.tag == '{http://www.w3.org/1999/xhtml}body'" py:strip="">
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
9 <div id="header">
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
10 <h1>${title}</h1>
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
11 </div>
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
12 ${item}
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
13 <div id="footer" />
c40a5dcd2b55 A couple of minor performance improvements.
cmlenz
parents: 57
diff changeset
14 </body>
57
300b6a3b0730 Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff changeset
15 </html>
Copyright (C) 2012-2017 Edgewall Software