Changeset 3131:3b84e8ba30c5 in livinglogic.python.xist
- Timestamp:
- 01/07/08 14:17:05 (12 years ago)
- Branch:
- default
- Files:
-
- 11 modified
Legend:
- Unmodified
- Added
- Removed
-
MIGRATION.xml
r3129 r3131 79 79 <li><lit>ulist</lit> to <lit>ul</lit>;</li> 80 80 <li><lit>dlist</lit> to <lit>dl</lit>;</li> 81 <li><lit>item</lit> to <lit>li</lit> or < /lit>dd</lit> (depending on whether81 <li><lit>item</lit> to <lit>li</lit> or <lit>dd</lit> (depending on whether 82 82 it's inside an <class>ol</class>, <class>ul</class> or <class>dl</class>);</li> 83 83 <li><lit>term</lit> to <lit>dt</lit>;</li> … … 367 367 on the fly), but a few arguments have changed:</p> 368 368 <dl> 369 < term><arg>handler</arg></term><item>This argument is no longer available, if you369 <dt><arg>handler</arg></dt><dd>This argument is no longer available, if you 370 370 need a special handler, you have to subclass <class>ll.xist.parsers.Parser</class> 371 and call its parsing methods.</ item>372 < term><arg>parser</arg></term><item>This argument has been renamed to371 and call its parsing methods.</dd> 372 <dt><arg>parser</arg></dt><dd>This argument has been renamed to 373 373 <arg>saxparser</arg> and is <em>not</em> a &sax;2 parser instance any longer, 374 but a callable that will create a &sax;2 parser.</ item>375 < term><arg>sysid</arg></term><item><arg>sysid</arg> is now available for all376 parsing functions not just <func>parseString</func>.</ item>374 but a callable that will create a &sax;2 parser.</dd> 375 <dt><arg>sysid</arg></dt><dd><arg>sysid</arg> is now available for all 376 parsing functions not just <func>parseString</func>.</dd> 377 377 </dl> 378 378 </section> … … 383 383 key. This has the following consequences:</p> 384 384 <ul> 385 < item><p>If you want a unique context for your own element class,385 <li><p>If you want a unique context for your own element class, 386 386 you <em>must</em> implement a new <class>Context</class> class (otherwise you'd 387 387 get <class>ll.xist.xsc.Element.Context</class>):</p> … … 397 397 </prog> 398 398 </example> 399 </ item>400 < item>Subclasses that don't overwrite <class>Context</class> (as well as instances399 </li> 400 <li>Subclasses that don't overwrite <class>Context</class> (as well as instances 401 401 of those classes) can be passed to <meth>ll.xist.converters.Converter.__getitem__</meth> 402 and the unique base class context object will be returned.</ item>402 and the unique base class context object will be returned.</li> 403 403 </ul> 404 404 </section> … … 581 581 582 582 <ul> 583 < item>The method <meth>withSep</meth> has been renamed584 to <meth>withsep</meth>.</ item>585 586 < item>The argument <arg>defaultEncoding</arg> for the various587 parsing functions has been renamed to <arg>encoding</arg>.</ item>583 <li>The method <meth>withSep</meth> has been renamed 584 to <meth>withsep</meth>.</li> 585 586 <li>The argument <arg>defaultEncoding</arg> for the various 587 parsing functions has been renamed to <arg>encoding</arg>.</li> 588 588 </ul> 589 589 -
NEWS.xml
r3128 r3131 2 2 <section><h>Changes in 3.0 (released ??/??/2007)</h> 3 3 <ul> 4 < item>Namespaces have been greatly simplified. There are no namespace modules any4 <li>Namespaces have been greatly simplified. There are no namespace modules any 5 5 longer. An element class can be assigned a namespace by setting the <lit>xmlns</lit> 6 6 class attribute to the namespace name. Global attributes can be assigned a … … 9 9 and <class>NSPool</class> are gone too. Instead a new class <class>Pool</class> 10 10 is used to specify which classes should be used for parsing. 11 </ item>12 13 < item>Dependency on <a href="http://pyxml.sf.net/">PyXML</a> has finally11 </li> 12 13 <li>Dependency on <a href="http://pyxml.sf.net/">PyXML</a> has finally 14 14 been dropped. &xist; now uses its own &xml; parsing &api;. Two parsers 15 15 are available: One based on <a href="http://expat.sourceforge.net/">expat</a> 16 16 and one based on a custom version of 17 <a href="http://effbot.org/zone/sgmlop-index.htm">sgmlop</a>.</ item>18 19 < item>Tree traversal has been rewritten again. XFind expressions involving17 <a href="http://effbot.org/zone/sgmlop-index.htm">sgmlop</a>.</li> 18 19 <li>Tree traversal has been rewritten again. XFind expressions involving 20 20 multiple uses of <lit>//</lit> now work correctly. The method <meth>walk</meth> 21 21 now doesn't yield <class>Cursor</class> objects, but simple path list … … 26 26 expression instead. Many XFind operators have been renamed and/or reimplemented 27 27 (see the documentation for the <mod>xfind</mod> module for more 28 information).</ item>29 30 < item><p>The methods <meth>__getitem__</meth>, <meth>__setitem__</meth>28 information).</li> 29 30 <li><p>The methods <meth>__getitem__</meth>, <meth>__setitem__</meth> 31 31 and <meth>__delitem__</meth> for <class>Frag</class> and <class>Element</class> 32 32 now support the new walk filters, so you can do:</p> 33 33 <ul> 34 < item><lit>del node[html.p]</lit> to delete all <class>html.p</class> child elements35 of <lit>node</lit>;</ item>36 < item><lit>del node[html.p[2]]</lit> to delete only the third37 <class>html.p</class>;</ item>38 < item><lit>node[xfind.hasclass("note")] = html.p("There was a note here!")</lit> to39 replace several child nodes with a new one;</ item>40 < item><lit>for c in node[xfind.empty]: print c.bytes()</lit> to print all41 empty (element) children of <lit>node</lit>;</ item>42 < item><lit>del node[node[0]]</lit> to delete the first child node (which is34 <li><lit>del node[html.p]</lit> to delete all <class>html.p</class> child elements 35 of <lit>node</lit>;</li> 36 <li><lit>del node[html.p[2]]</lit> to delete only the third 37 <class>html.p</class>;</li> 38 <li><lit>node[xfind.hasclass("note")] = html.p("There was a note here!")</lit> to 39 replace several child nodes with a new one;</li> 40 <li><lit>for c in node[xfind.empty]: print c.bytes()</lit> to print all 41 empty (element) children of <lit>node</lit>;</li> 42 <li><lit>del node[node[0]]</lit> to delete the first child node (which is 43 43 silly, but illustrates that you can pass a node to get/replace/delete 44 that node);</ item>45 </ul> 46 </ item>47 48 < item><p>A new module <mod>ll.xist.css</mod> has been added which contains44 that node);</li> 45 </ul> 46 </li> 47 48 <li><p>A new module <mod>ll.xist.css</mod> has been added which contains 49 49 &css; related functionality: The generator function <func>iterrules</func> 50 50 can be passed an &xist; tree and it will produce all &css; rules defined in any … … 54 54 package.</p> 55 55 56 <p>The function <func>applystylesheets</func> modifies the &xist; tree 57 passed inby removing all &css; (from <class>html.link</class> and <class>html.style</class>56 <p>The function <func>applystylesheets</func> modifies the &xist; tree passed in 57 by removing all &css; (from <class>html.link</class> and <class>html.style</class> 58 58 elements and their <lit>@import</lit>ed stylesheets) and putting the styles into 59 59 <lit>style</lit> attributes of the affected elements instead.</p> 60 60 61 <p>The function <func>selector</func> return a tree walk filter from 62 a &css;selector passed as a string.</p>63 </ item>64 65 < item>61 <p>The function <func>selector</func> return a tree walk filter from a &css; 62 selector passed as a string.</p> 63 </li> 64 65 <li> 66 66 <p>Constructing trees can now be done with <lit>with</lit> blocks. Code looks 67 67 like this:</p> … … 86 86 <func>add</func> and supports <lit>with</lit> blocks now instead of 87 87 <a href="http://codespeak.net/svn/user/hpk/talks/xpython-talk.txt">XPython</a>.</p> 88 </ item>89 90 < item>A subset of <a href="http://docutils.sourceforge.net/rst.html">ReST</a>88 </li> 89 90 <li>A subset of <a href="http://docutils.sourceforge.net/rst.html">ReST</a> 91 91 is supported now for docstrings when using the <mod>ll.xist.ns.doc</mod> 92 92 module. The module attribute <lit>__docformat__</lit> is now honored (Set it 93 to <lit>"xist"</lit> to get &xist; docstrings).</ item>94 95 < item>Many classes in the <mod>ll.xist.ns.doc</mod> have been renamed96 to more familiar names (from &html;, &xhtml; 2 or ReST).</ p>97 98 < item>The <lit>media</lit> attribute of <class>html.link</class> and99 <class>html.style</class> now has a method <meth>hasmedia</meth>.</ item>100 101 < item>The node method <meth>asBytes</meth> has been renamed to93 to <lit>"xist"</lit> to get &xist; docstrings).</li> 94 95 <li>Many classes in the <mod>ll.xist.ns.doc</mod> have been renamed 96 to more familiar names (from &html;, &xhtml; 2 or ReST).</li> 97 98 <li>The <lit>media</lit> attribute of <class>html.link</class> and 99 <class>html.style</class> now has a method <meth>hasmedia</meth>.</li> 100 101 <li>The node method <meth>asBytes</meth> has been renamed to 102 102 <meth>bytes</meth> and <meth>bytes</meth> has been renamed to 103 <meth>iterbytes</meth>.</ item>104 105 < item>The node method <meth>asString</meth> has been renamed to103 <meth>iterbytes</meth>.</li> 104 105 <li>The node method <meth>asString</meth> has been renamed to 106 106 <meth>string</meth> and a new method <meth>iterstring</meth> has been 107 added.</ item>108 109 < item><class>ll.xist.ns.xml.XML10</class> is gone now. Use110 <class>ll.xist.ns.xml.XML</class> instead.</ item>111 112 < item><func>xsc.tonode</func> now will raise an exception when it113 can't handle an argument instead of issuing a warning.</ item>114 115 < item>A class attribute <lit>empty</lit> inside element classes will now no116 longer get converted into <lit>model</lit>.</ item>117 118 < item><class>ll.xist.ns.doc.pyref</class> now copes better with decorated119 methods.</ item>120 121 < item>The deprecated <class>Element</class> methods <meth>hasAttr</meth>,107 added.</li> 108 109 <li><class>ll.xist.ns.xml.XML10</class> is gone now. Use 110 <class>ll.xist.ns.xml.XML</class> instead.</li> 111 112 <li><func>xsc.tonode</func> now will raise an exception when it 113 can't handle an argument instead of issuing a warning.</li> 114 115 <li>A class attribute <lit>empty</lit> inside element classes will now no 116 longer get converted into <lit>model</lit>.</li> 117 118 <li><class>ll.xist.ns.doc.pyref</class> now copes better with decorated 119 methods.</li> 120 121 <li>The deprecated <class>Element</class> methods <meth>hasAttr</meth>, 122 122 <meth>hasattr</meth>, <meth>isallowedattr</meth>, <meth>getAttr</meth>, 123 123 <meth>getattr</meth>, <meth>setDefaultAttr</meth>, … … 130 130 <meth>iterallowedattritems</meth> and <meth>copyDefaultAttrs</meth> 131 131 have been removed. The deprecated <class>Attrs</class> method 132 <meth>copydefaults</meth> has been removed too.</ item>133 134 < item>The namespace module <mod>ll.xist.ns.cond</mod> has been removed.</item>135 136 < item>When calling the function <func>ll.xist.parsers.parseURL</func>132 <meth>copydefaults</meth> has been removed too.</li> 133 134 <li>The namespace module <mod>ll.xist.ns.cond</mod> has been removed.</li> 135 136 <li>When calling the function <func>ll.xist.parsers.parseURL</func> 137 137 the arguments <arg>headers</arg> and <arg>data</arg> are now passed along 138 138 to the parser's method only if they are specified. This makes it possible to 139 pass ssh &url;s to <func>ll.xist.parsers.parseURL</func>.</ item>140 141 < item>The methods <meth>withnames</meth> and <meth>withoutnames</meth> have139 pass ssh &url;s to <func>ll.xist.parsers.parseURL</func>.</li> 140 141 <li>The methods <meth>withnames</meth> and <meth>withoutnames</meth> have 142 142 been split into two that take Python names and two that take XML names. 143 143 Multiple arguments are used now (instead of one argument that must be a sequence). 144 Passing a namespace to remove all attributes from the namespace is no longer supported.</ item>145 146 < item>The <class>Attrs</class> methods <meth>updatenew</meth> and147 <meth>updatexisting</meth> have been removed.</ item>144 Passing a namespace to remove all attributes from the namespace is no longer supported.</li> 145 146 <li>The <class>Attrs</class> methods <meth>updatenew</meth> and 147 <meth>updatexisting</meth> have been removed.</li> 148 148 149 149 </ul> … … 154 154 155 155 <ul> 156 < item>The Python quotes example no longer contains the &xml; source157 or the generated &html;.</ item>156 <li>The Python quotes example no longer contains the &xml; source 157 or the generated &html;.</li> 158 158 </ul> 159 159 … … 161 161 <section><h>Changes in 2.15.4 (released 07/16/2007)</h> 162 162 <ul> 163 < item>The Python quotes example now always parses the file from164 the original &url;.</ item>165 < item>The Python quotes and the media example now print the result166 to <lit>stdout</lit>.</ item>163 <li>The Python quotes example now always parses the file from 164 the original &url;.</li> 165 <li>The Python quotes and the media example now print the result 166 to <lit>stdout</lit>.</li> 167 167 </ul> 168 168 </section> … … 171 171 <section><h>Changes in 2.15.3 (released 07/16/2007)</h> 172 172 <ul> 173 < item>Use a consistent license (MIT) everywhere. This should make174 &xist; Debian compatible.</ item>175 < item>Change the Python quotes example, so that it works even if173 <li>Use a consistent license (MIT) everywhere. This should make 174 &xist; Debian compatible.</li> 175 <li>Change the Python quotes example, so that it works even if 176 176 there's no <filename>python-quotes.xml</filename> in the current 177 directory.</ item>177 directory.</li> 178 178 </ul> 179 179 </section> … … 182 182 <section><h>Changes in 2.15.2 (released 01/24/2007)</h> 183 183 <ul> 184 < item>Fixed a bug in <meth>presenters.CodePresenter.__str__</meth>.</item>185 < item>Fixed base URL handling for tidy parsing.</item>186 < item>Updated examples.</item>187 < item>Updated <func>xiter</func> and <func>xattrs</func>184 <li>Fixed a bug in <meth>presenters.CodePresenter.__str__</meth>.</li> 185 <li>Fixed base URL handling for tidy parsing.</li> 186 <li>Updated examples.</li> 187 <li>Updated <func>xiter</func> and <func>xattrs</func> 188 188 implementations for <class>Node</class> and <class>Namespace</class> to 189 conform to the newest version of IPython.</ item>189 conform to the newest version of IPython.</li> 190 190 </ul> 191 191 </section> … … 194 194 <section><h>Changes in 2.15.1 (released 09/25/2006)</h> 195 195 <ul> 196 < item>Fixed a few bugs in the <mod>sgmlop</mod> function declarations.</item>197 < item>Readded the spacer pixel.</item>196 <li>Fixed a few bugs in the <mod>sgmlop</mod> function declarations.</li> 197 <li>Readded the spacer pixel.</li> 198 198 </ul> 199 199 </section> … … 202 202 <section><h>Changes in 2.15 (released 09/24/2006)</h> 203 203 <ul> 204 < item>&xist; has been made compatible with Python 2.5: Code has been updated204 <li>&xist; has been made compatible with Python 2.5: Code has been updated 205 205 to use the proper C API for memory management and <a href="http://www.python.org/dev/peps/pep-0353/">PEP 353</a> 206 support has been added. &xist; now includes its own fixed version of <mod>sgmlop</mod>.</ item>207 < item>The <class>ll.xist.xsc.Attrs</class> methods <meth>with</meth> and206 support has been added. &xist; now includes its own fixed version of <mod>sgmlop</mod>.</li> 207 <li>The <class>ll.xist.xsc.Attrs</class> methods <meth>with</meth> and 208 208 <meth>without</meth> have been renamed to <meth>withnames</meth> and 209 <meth>withoutnames</meth> for Python 2.5 compatibility.</ item>210 < item><class>ll.xist.ns.htmlspecials.pixel</class> no longer handles colors209 <meth>withoutnames</meth> for Python 2.5 compatibility.</li> 210 <li><class>ll.xist.ns.htmlspecials.pixel</class> no longer handles colors 211 211 via different GIFs. It uses the <lit>background-color</lit> in the <lit>style</lit> 212 212 attribute instead. The same change has been implemented for 213 213 <class>ll.xist.ns.htmlspecials.autopixel</class>. It's now possible to overwrite 214 214 the default <lit>src</lit> attribute value of <lit>root:px/spc.gif</lit> either 215 via the &xml; attribute or via the converter context.</ item>216 < item>The node method <meth>asText</meth> has been made a function, moved215 via the &xml; attribute or via the converter context.</li> 216 <li>The node method <meth>asText</meth> has been made a function, moved 217 217 into the <mod>html</mod> namespace and renamed to <func>astext</func>. 218 218 Furthermore <app moreinfo="http://elinks.or.cz/">elinks</app> is used for plain text 219 formatting now instead of <app moreinfo="http://w3m.sourceforge.net/">w3m</app>.</ item>219 formatting now instead of <app moreinfo="http://w3m.sourceforge.net/">w3m</app>.</li> 220 220 </ul> 221 221 </section> … … 224 224 <section><h>Changes in 2.14.2 (released 07/04/2006)</h> 225 225 <ul> 226 < item>Fixed a bug in the <meth>presentAttr</meth> method of227 <class>ll.xist.presenters.TreePresenter</class>.</ item>226 <li>Fixed a bug in the <meth>presentAttr</meth> method of 227 <class>ll.xist.presenters.TreePresenter</class>.</li> 228 228 </ul> 229 229 </section> … … 232 232 <section><h>Changes in 2.14.1 (released 06/29/2006)</h> 233 233 <ul> 234 < item>Fixed a bug in the <meth>presentEntity</meth> method of235 <class>ll.xist.presenters.CodePresenter</class>.</ item>236 < item>Updated installation instructions.</item>234 <li>Fixed a bug in the <meth>presentEntity</meth> method of 235 <class>ll.xist.presenters.CodePresenter</class>.</li> 236 <li>Updated installation instructions.</li> 237 237 </ul> 238 238 </section> … … 241 241 <section><h>Changes in 2.14 (released 06/28/2006)</h> 242 242 <ul> 243 < item>Namespaces for RSS 0.91, RSS 2.0 and Atom 1.0 have been added.</item>244 245 < item>A new namespace <mod>ll.xist.ns.detox</mod> has been added that243 <li>Namespaces for RSS 0.91, RSS 2.0 and Atom 1.0 have been added.</li> 244 245 <li>A new namespace <mod>ll.xist.ns.detox</mod> has been added that 246 246 is similar to <mod>ll.toxic</mod> but can be used to generate Python 247 247 code instead of PL/SQL code. Using <mod>detox</mod> templates is about 248 248 50 times faster than using &xist; trees directly and about 10 times faster than 249 <a href="http://kid.lesscode.org/">Kid</a>.</ item>250 251 < item>Presenters are now compatible to <a href="http://ipython.scipy.org/">IPython</a>'s249 <a href="http://kid.lesscode.org/">Kid</a>.</li> 250 251 <li>Presenters are now compatible to <a href="http://ipython.scipy.org/">IPython</a>'s 252 252 ipipe module. This means that you can browse &xist; trees interactively 253 253 if you have IPython installed. <class>NormalPresenter</class> and the 254 254 <class>Node</class> methods <meth>repr</meth> and <meth>asrepr</meth> 255 have been removed.</ item>256 257 < item>A new processing instruction <class>ll.xist.ns.specials.url</class>255 have been removed.</li> 256 257 <li>A new processing instruction <class>ll.xist.ns.specials.url</class> 258 258 has been added that does the same &url; transformation as 259 <class>ll.xist.xsc.URLAttr</class> does.</ item>260 261 < item>On publishing <class>ll.xist.ns.html.html</class> now only adds a262 <lit>lang</lit> and <lit>xml:lang</lit> attribute, if neither of them exists.</ item>263 264 < item><mod>setuptools</mod> is now supported for installation.</item>259 <class>ll.xist.xsc.URLAttr</class> does.</li> 260 261 <li>On publishing <class>ll.xist.ns.html.html</class> now only adds a 262 <lit>lang</lit> and <lit>xml:lang</lit> attribute, if neither of them exists.</li> 263 264 <li><mod>setuptools</mod> is now supported for installation.</li> 265 265 </ul> 266 266 </section> … … 269 269 <section><h>Changes in 2.13 (released 10/31/2005)</h> 270 270 <ul> 271 < item><meth>ll.xist.xsc.Namespace.tokenize</meth> requires a271 <li><meth>ll.xist.xsc.Namespace.tokenize</meth> requires a 272 272 <class>unicode</class> object as input now. This makes it possible 273 273 to use encodings that are not ASCII compatible (such as UTF-16). 274 The <arg>encoding</arg> argument is gone.</ item>275 276 < item><meth>ll.xist.xsc.Node.asString</meth> uses the <arg>encoding</arg>274 The <arg>encoding</arg> argument is gone.</li> 275 276 <li><meth>ll.xist.xsc.Node.asString</meth> uses the <arg>encoding</arg> 277 277 argument to determine which characters have to be output as character references 278 now. (You'll still get a unicode object as the result.)</ item>279 280 < item>A new processing instruction class <class>ll.xist.ns.specials.literal</class>278 now. (You'll still get a unicode object as the result.)</li> 279 280 <li>A new processing instruction class <class>ll.xist.ns.specials.literal</class> 281 281 has been added, that will output its content literally when published. This 282 282 can be used for embedding preformatted &xml; (e.g. from a database) into an 283 XIST tree.</ item>283 XIST tree.</li> 284 284 </ul> 285 285 … … 289 289 <section><h>Changes in 2.12 (released 10/13/2005)</h> 290 290 <ul> 291 < item>Namespaces for <a href="http://www.relaxng.org/">Relax NG</a> and292 <a href="http://kid.lesscode.org/">Kid</a> have been added.</ item>293 294 < item>&xist; requires version 1.0 of the core package now.</item>295 296 < item>The class name for the DocBook &dtd; class has been fixed.</item>291 <li>Namespaces for <a href="http://www.relaxng.org/">Relax NG</a> and 292 <a href="http://kid.lesscode.org/">Kid</a> have been added.</li> 293 294 <li>&xist; requires version 1.0 of the core package now.</li> 295 296 <li>The class name for the DocBook &dtd; class has been fixed.</li> 297 297 298 298 </ul> … … 303 303 <section><h>Changes in 2.11 (released 07/29/2005)</h> 304 304 <ul> 305 < item>A script <filename>xml2xsc.py</filename> has been added, that305 <li>A script <filename>xml2xsc.py</filename> has been added, that 306 306 can be used to parse an &xml; file and generate a rudimentary &xist; namespace 307 from it.</ item>308 309 < item>A <class>DocType</class> for XHTML 1.1 has been added310 (suggested by Elvelind Grandin).</ item>311 312 < item>Line number information is now added when parsing &html;.</item>313 314 < item>The <meth>sorted</meth> method now supports the same arguments307 from it.</li> 308 309 <li>A <class>DocType</class> for XHTML 1.1 has been added 310 (suggested by Elvelind Grandin).</li> 311 312 <li>Line number information is now added when parsing &html;.</li> 313 314 <li>The <meth>sorted</meth> method now supports the same arguments 315 315 (<arg>cmp</arg>, <arg>key</arg> and <arg>reverse</arg>) as 316 <meth>list.sort</meth> and <func>sorted</func> in Python 2.4.</ item>317 318 < item>The <meth>walk</meth> doesn't yield the node directly, but yields319 a <class>Cursor</class> object now, with has several ways of referencing the node.</ item>320 321 < item>New methods <meth>walknode</meth>, <meth>walkpath</meth> and322 <meth>walkindex</meth> have been added.</ item>323 324 < item>Presenters use an iterator &api; instead of a stream &api; now. Dumping316 <meth>list.sort</meth> and <func>sorted</func> in Python 2.4.</li> 317 318 <li>The <meth>walk</meth> doesn't yield the node directly, but yields 319 a <class>Cursor</class> object now, with has several ways of referencing the node.</li> 320 321 <li>New methods <meth>walknode</meth>, <meth>walkpath</meth> and 322 <meth>walkindex</meth> have been added.</li> 323 324 <li>Presenters use an iterator &api; instead of a stream &api; now. Dumping 325 325 an &xml; tree presentation to the terminal can now start immediately instead 326 of having to wait for the complete string to be formatted.</ item>327 328 < item>Fixed a bug with element/attribute names that contained a <lit>.</lit>329 character. (This broke <mod>ll.xist.ns.fo</mod>.)</ item>330 331 < item>Fixed a bug with <lit>xmlns</lit> attributes in nested elements.332 When an element ended the parser restored the wrong prefix mapping.</ item>333 334 < item>The <dirname>python-quotes</dirname> demo has been updated to use the335 current version of AMK's &xml; file.</ item>336 337 < item>Removed iterator stuff from <mod>ll.xist.xfind</mod>, as this338 is now part of the <mod>ll</mod> package/module.</ item>339 340 < item>The function <func>ToNode</func> has been renamed to341 <func>tonode</func>.</ item>342 343 < item><class>ll.xist.Context</class> no longer subclasses <class>list</class>.</item>344 345 < item><class>ll.xist.ns.doc.explain</class> will now try to output the objects346 in the order in which they appear in the Python source.</ item>347 348 < item>The node methods <meth>find</meth> and <meth>findfirst</meth>349 have been removed.</ item>350 351 < item><mod>ll.xist.ns.cond</mod> now uses a sandbox dictionary in a352 converter context for evaluating expression.</ item>326 of having to wait for the complete string to be formatted.</li> 327 328 <li>Fixed a bug with element/attribute names that contained a <lit>.</lit> 329 character. (This broke <mod>ll.xist.ns.fo</mod>.)</li> 330 331 <li>Fixed a bug with <lit>xmlns</lit> attributes in nested elements. 332 When an element ended the parser restored the wrong prefix mapping.</li> 333 334 <li>The <dirname>python-quotes</dirname> demo has been updated to use the 335 current version of AMK's &xml; file.</li> 336 337 <li>Removed iterator stuff from <mod>ll.xist.xfind</mod>, as this 338 is now part of the <mod>ll</mod> package/module.</li> 339 340 <li>The function <func>ToNode</func> has been renamed to 341 <func>tonode</func>.</li> 342 343 <li><class>ll.xist.Context</class> no longer subclasses <class>list</class>.</li> 344 345 <li><class>ll.xist.ns.doc.explain</class> will now try to output the objects 346 in the order in which they appear in the Python source.</li> 347 348 <li>The node methods <meth>find</meth> and <meth>findfirst</meth> 349 have been removed.</li> 350 351 <li><mod>ll.xist.ns.cond</mod> now uses a sandbox dictionary in a 352 converter context for evaluating expression.</li> 353 353 </ul> 354 354 </section> … … 357 357 <section><h>Changes in 2.10 (released 05/20/2005)</h> 358 358 <ul> 359 < item>The content of the processing instruction <class>ll.xist.ns.code.pyexec</class>359 <li>The content of the processing instruction <class>ll.xist.ns.code.pyexec</class> 360 360 will not be executed at construction time, but at conversion time. The code 361 361 in <class>ll.xist.ns.code.pyexec</class> or <class>ll.xist.ns.code.pyeval</class> 362 362 will no longer be executed in the <mod>ll.xist.sandbox</mod> module 363 363 (which has been removed), but in a sandbox dictionary in the converter context 364 of the <mod>ll.xist.ns.code</mod> namespace.</ item>365 366 < item>The tests have been ported to <a href="http://codespeak.net/py/current/doc/test.html">py.test</a>.</item>367 368 < item>The method <meth>mapped</meth> is now callable without arguments.364 of the <mod>ll.xist.ns.code</mod> namespace.</li> 365 366 <li>The tests have been ported to <a href="http://codespeak.net/py/current/doc/test.html">py.test</a>.</li> 367 368 <li>The method <meth>mapped</meth> is now callable without arguments. 369 369 In this case a converter will be created on the fly. You can pass constructor 370 arguments for this converter to <meth>mapped</meth> as keyword arguments.</ item>371 372 < item>The publishing &api; has changed again: <meth>ll.xist.publishers.Publisher.publish</meth>370 arguments for this converter to <meth>mapped</meth> as keyword arguments.</li> 371 372 <li>The publishing &api; has changed again: <meth>ll.xist.publishers.Publisher.publish</meth> 373 373 no longer accepts an argument <arg>stream</arg> to which the byte strings are 374 374 written, but it is a generator now. The publisher methods <meth>write</meth> … … 378 378 <meth>bytes</meth> for nodes now, which can be passed the same arguments 379 379 as <meth>asBytes</meth>. These changes should help when using 380 &xist; in &wsgi; applications.</ item>381 382 < item>The iterator returned from <meth>Element.__getitem__</meth>,380 &xist; in &wsgi; applications.</li> 381 382 <li>The iterator returned from <meth>Element.__getitem__</meth>, 383 383 <meth>Frag.__getitem__</meth> and the <meth>walk</meth> method 384 384 now supports <meth>__getitem__</meth> itself, so you can write 385 385 <lit><rep>table</rep>[html.tr][0]</lit> to get the first row from a table or 386 386 <lit><rep>page</rep>.walk(xsc.FindTypeAll(html.td))[-1]</lit> to get the last table cell 387 from a complete &html; page.</ item>388 389 < item>Several bugs in the namespaces <mod>ll.xist.ns.meta</mod>,387 from a complete &html; page.</li> 388 389 <li>Several bugs in the namespaces <mod>ll.xist.ns.meta</mod>, 390 390 <mod>ll.xist.ns.form</mod> and 391 <mod>ll.xist.ns.specials</mod> have been fixed.</ item>392 < item>The namespace modules <mod>ll.xist.ns.css</mod> and393 <mod>ll.xist.ns.cssspecials</mod> have been removed.</ item>391 <mod>ll.xist.ns.specials</mod> have been fixed.</li> 392 <li>The namespace modules <mod>ll.xist.ns.css</mod> and 393 <mod>ll.xist.ns.cssspecials</mod> have been removed.</li> 394 394 </ul> 395 395 </section> … … 398 398 <section><h>Changes in 2.9 (released 04/21/2005)</h> 399 399 <ul> 400 < item>&xist; trees can now be pickled. The only restriction is that global400 <li>&xist; trees can now be pickled. The only restriction is that global 401 401 attributes must come from a namespace that has been turned into a module 402 402 via <meth>makemod</meth>, so that this module can be imported on 403 unpickling.</ item>404 405 < item><p>Two arguments of the <meth>walk</meth> method have been renamed:403 unpickling.</li> 404 405 <li><p>Two arguments of the <meth>walk</meth> method have been renamed: 406 406 <arg>filtermode</arg> has been renamed to <arg>inmode</arg> and <arg>walkmode</arg> 407 407 has been renamed to <arg>outmode</arg>. For these modes two new values are 408 408 supported:</p> 409 409 <dl> 410 < term><lit>ll.xist.xsc.walkindex</lit></term><item>The value passed to the filter410 <dt><lit>ll.xist.xsc.walkindex</lit></dt><dd>The value passed to the filter 411 411 function or yielded from the iterator is a list containing child indizes and 412 attribute names that specify the path to the node in question.</ item>413 < term><lit>ll.xist.xsc.walkrootindex</lit></term><item>The filter function412 attribute names that specify the path to the node in question.</dd> 413 <dt><lit>ll.xist.xsc.walkrootindex</lit></dt><dd>The filter function 414 414 will be called with two arguments: The first is the root node of the tree (i.e. 415 415 the node for which <meth>walk</meth> has been called), the second one is 416 416 an index path (just like for <lit>ll.xist.xsc.walkindex</lit>). If used as 417 an <arg>outmode</arg> a tuple with these two values will be yielded.</ item>417 an <arg>outmode</arg> a tuple with these two values will be yielded.</dd> 418 418 </dl> 419 </ item>420 < item><p>Attribute mappings now support <meth>__getitem__</meth>,419 </li> 420 <li><p>Attribute mappings now support <meth>__getitem__</meth>, 421 421 <meth>__setitem__</meth> and <meth>__delitem__</meth> with list 422 422 arguments, i.e. you can do:</p> … … 433 433 kunz 434 434 </prog> 435 </ item>436 < item><p>&xml; attributes can now be accessed as Python attributes, i.e.</p>435 </li> 436 <li><p>&xml; attributes can now be accessed as Python attributes, i.e.</p> 437 437 <prog> 438 438 <prompt>>>> </prompt><input>from ll.xist.ns import html</input> … … 443 443 <p>(Don't confuse this with <lit>e.Attrs.href</lit> which is the 444 444 attribute class.)</p> 445 </ item>446 447 < item><class>Frag</class> and <class>Element</class> now support <class>Node</class>445 </li> 446 447 <li><class>Frag</class> and <class>Element</class> now support <class>Node</class> 448 448 subclasses as arguments to their <meth>__getitem__</meth> method: An iterator 449 for all children of the specified type will be returned.</ item>450 451 < item>The encoding used for parsing now defaults to <lit>None</lit>. When449 for all children of the specified type will be returned.</li> 450 451 <li>The encoding used for parsing now defaults to <lit>None</lit>. When 452 452 reading from an &url; and no default encoding has been specified the one 453 453 from the <lit>Content-Type</lit> header will be used. If this still doesn't 454 454 result in a usable encoding, <lit>"utf-8"</lit> will be used when parsing &xml; 455 and <lit>"iso-8859-1"</lit> will be used when parsing broken &html;.</ item>456 457 < item>All error and warning classes from <mod>ll.xist.errors</mod>455 and <lit>"iso-8859-1"</lit> will be used when parsing broken &html;.</li> 456 457 <li>All error and warning classes from <mod>ll.xist.errors</mod> 458 458 have been merged into <mod>ll.xist.xsc</mod>. This avoids import 459 problems with circular imports.</ item>460 461 < item>The attributes <lit>showLocation</lit> and <lit>showPath</lit>459 problems with circular imports.</li> 460 461 <li>The attributes <lit>showLocation</lit> and <lit>showPath</lit> 462 462 of <class>ll.xist.presenters.TreePresenter</class> have been lowercased and 463 presenters are properly reset after they've done their job.</ item>464 465 < item>The class attribute <lit>xmlname</lit> will no longer be turned into a list463 presenters are properly reset after they've done their job.</li> 464 465 <li>The class attribute <lit>xmlname</lit> will no longer be turned into a list 466 466 containing the Python and the &xml; name, but will be the &xml; name only. You 467 can get the Python name from <lit><rep>foo</rep>.__class__.__name__</lit>.</ item>468 469 < item><class>DeprecationWarning</class>s for <lit>name</lit> and470 <lit>attrHandlers</lit> have finally been removed.</ item>471 472 < item>Instances of <class>ll.xist.xsc.Entity</class> subclasses can now be467 can get the Python name from <lit><rep>foo</rep>.__class__.__name__</lit>.</li> 468 469 <li><class>DeprecationWarning</class>s for <lit>name</lit> and 470 <lit>attrHandlers</lit> have finally been removed.</li> 471 472 <li>Instances of <class>ll.xist.xsc.Entity</class> subclasses can now be 473 473 compared. <meth>__eq__</meth> simply checks if the objects are instances 474 of the same class.</ item>474 of the same class.</li> 475 475 </ul> 476 476 </section> … … 479 479 <section><h>Changes in 2.8.1 (released 03/22/2005)</h> 480 480 <ul> 481 < item>Added a note about the package init file to the installation482 documentation.</ item>481 <li>Added a note about the package init file to the installation 482 documentation.</li> 483 483 </ul> 484 484 </section> … … 487 487 <section><h>Changes in 2.8 (released 01/03/2005)</h> 488 488 <ul> 489 < item>&xist; requires Python 2.4 now.</item>490 491 < item><class>ll.xist.ns.specials.x</class> has been renamed to492 <class>ll.xist.ns.specials.ignore</class>.</ item>493 494 < item><class>ll.xist.utils.findAttr</class> has been renamed to495 <class>ll.xist.utils.findattr</class>.</ item>496 497 < item><class>ll.xist.xfind.item</class> no longer handles slices.</item>498 499 < item>XFind has been enhanced to support item and slice operators, i.e.489 <li>&xist; requires Python 2.4 now.</li> 490 491 <li><class>ll.xist.ns.specials.x</class> has been renamed to 492 <class>ll.xist.ns.specials.ignore</class>.</li> 493 494 <li><class>ll.xist.utils.findAttr</class> has been renamed to 495 <class>ll.xist.utils.findattr</class>.</li> 496 497 <li><class>ll.xist.xfind.item</class> no longer handles slices.</li> 498 499 <li>XFind has been enhanced to support item and slice operators, i.e. 500 500 if <lit><rep>foo</rep></lit> is an XFind operator, <lit><rep>foo</rep>[0]</lit> 501 501 is an operator that will produce the first node from <lit><rep>foo</rep></lit> 502 (if there is one). Negative values and slices are supported too.</ item>503 504 < item>Operators can be chained via division: <lit>html.a/html.b</lit> is an505 operator that can be passed around and applied to a node.</ item>506 507 < item>&xist; requires the new core module and makes use of the new502 (if there is one). Negative values and slices are supported too.</li> 503 504 <li>Operators can be chained via division: <lit>html.a/html.b</lit> is an 505 operator that can be passed around and applied to a node.</li> 506 507 <li>&xist; requires the new core module and makes use of the new 508 508 <z>cooperative displayhook</z> functionality defined there: If you install 509 509 the displayhook you can tweak or replace <lit>ll.xist.presenters.hookpresenter</lit> 510 to change the output.</ item>510 to change the output.</li> 511 511 </ul> 512 512 </section> … … 515 515 <section><h>Changes in 2.7 (released 11/24/2004)</h> 516 516 <ul> 517 < item>The transparent pixel used by <class>ll.xist.ns.htmlspecials.pixel</class>518 has been renamed to <filename>spc.gif</filename> to avoid problems with IE.</ item>519 < item>Removed a debug print in <class>ll.xist.xfind.Finder.__getitem__</class>.</item>520 < item><mod>ll.xist.xfind</mod> now has a new function <func>item</func>,517 <li>The transparent pixel used by <class>ll.xist.ns.htmlspecials.pixel</class> 518 has been renamed to <filename>spc.gif</filename> to avoid problems with IE.</li> 519 <li>Removed a debug print in <class>ll.xist.xfind.Finder.__getitem__</class>.</li> 520 <li><mod>ll.xist.xfind</mod> now has a new function <func>item</func>, 521 521 that can be used to get a certain item or slice from an iterator. 522 522 <func>xfind.first</func> and <func>xfind.last</func> have been 523 523 changed to use <func>xfind.item</func>, so you now have to pass a 524 default value to get the old behaviour.</ item>525 < item>Obsolete options in <mod>ll.xist.options</mod> have been removed526 (and <lit>reprEncoding</lit> has been renamed to <lit>reprencoding</lit>).</ item>524 default value to get the old behaviour.</li> 525 <li>Obsolete options in <mod>ll.xist.options</mod> have been removed 526 (and <lit>reprEncoding</lit> has been renamed to <lit>reprencoding</lit>).</li> 527 527 </ul> 528 528 </section> … … 531 531 <section><h>Changes in 2.6.2 (released 06/06/2005)</h> 532 532 <ul> 533 < item>Fixed a bug in <meth>ll.xist.parsers.Parser.parse</meth>.</item>533 <li>Fixed a bug in <meth>ll.xist.parsers.Parser.parse</meth>.</li> 534 534 </ul> 535 535 </section> … … 538 538 <section><h>Changes in 2.6.1 (released 11/02/2004)</h> 539 539 <ul> 540 < item>Fixed a bug in <meth>ll.xist.xfind.Finder.__floordiv__</meth>.</item>541 < item>Restricted characters as defined in540 <li>Fixed a bug in <meth>ll.xist.xfind.Finder.__floordiv__</meth>.</li> 541 <li>Restricted characters as defined in 542 542 <a href="http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-RestrictedChar">&xml; 1.1</a> 543 will now be published as character references.</ item>543 will now be published as character references.</li> 544 544 </ul> 545 545 </section> … … 548 548 <section><h>Changes in 2.6 (released 10/26/2004)</h> 549 549 <ul> 550 < item><func>ToNode</func> now tries iterating through the550 <li><func>ToNode</func> now tries iterating through the 551 551 value passed in, so it's now possible to pass iterators and generators 552 552 (and generator expressions in Python 2.4) to <class>Frag</class> 553 and <class>Element</class> constructors.</ item>554 555 < item><p>A new &api; named XFind has been added for iterating through &xml;553 and <class>Element</class> constructors.</li> 554 555 <li><p>A new &api; named XFind has been added for iterating through &xml; 556 556 trees. XFind expressions look somewhat like XPath expressions but are pure 557 557 Python expressions. For example finding all images inside links in an &html; … … 569 569 <p>The module <mod>ll.xist.xfind</mod> contains several operators 570 570 that can be used in XFind expressions.</p> 571 </ item>572 573 < item>Parsing broken &html; is now done with the &html; parser from571 </li> 572 573 <li>Parsing broken &html; is now done with the &html; parser from 574 574 <a href="http://www.xmlsoft.org/">libxml2</a>. The parsing functions 575 575 no longer accept options for tidy, only the boolean value of the <arg>tidy</arg> 576 argument is used.</ item>577 578 < item>The publishing &api; has been simplified: Publication can now be done with576 argument is used.</li> 577 578 <li>The publishing &api; has been simplified: Publication can now be done with 579 579 a call to <meth>ll.xist.publishers.Publisher.publish</meth>, passing in a 580 580 <class>ll.xist.xsc.Node</class>. Writing strings to the publisher output is 581 581 now done with <meth>ll.xist.publishers.Publisher.write</meth>. The methods 582 582 <meth>beginPublication</meth> and <meth>endPublication</meth> have been 583 removed.</ item>584 585 < item>The presentation &api; has been simplified in the same way: You'll get a583 removed.</li> 584 585 <li>The presentation &api; has been simplified in the same way: You'll get a 586 586 presentation by calling: <lit>string = <rep>presenter</rep>.present(<rep>node</rep>)</lit>. 587 587 The methods <meth>beginPresentation</meth> and <meth>endPresentation</meth> 588 have been removed.</ item>589 590 < item>The parser now has the option to ignore illegal elements, attributes,588 have been removed.</li> 589 590 <li>The parser now has the option to ignore illegal elements, attributes, 591 591 processing instructions and entities. The default behaviour is to raise an 592 exception, but this can now be reconfigured via Python's warning framework.</ item>593 594 < item>The classmethod <meth>tokenize</meth> from <mod>ll.toxic</mod>592 exception, but this can now be reconfigured via Python's warning framework.</li> 593 594 <li>The classmethod <meth>tokenize</meth> from <mod>ll.toxic</mod> 595 595 has been moved to <class>ll.xist.xsc.Namespace</class>, so it's now possible 596 to tokenize an &xml; string for other processing instructions as well.</ item>597 598 < item>A new class <class>ll.xist.xsc.NSPool</class> has been added.596 to tokenize an &xml; string for other processing instructions as well.</li> 597 598 <li>A new class <class>ll.xist.xsc.NSPool</class> has been added. 599 599 An <class>NSPool</class> contains a pool of namespaces from which the parser 600 600 selects the appropriate namespace once an <lit>xmlns</lit> attribute is 601 encountered.</ item>602 603 < item>The script <filename>xscmake.py</filename> (which has been unmaintained604 for a while now) has been removed.</ item>605 606 < item>Elements <class>hostname</class>, <class>tty</class>, <class>prompt</class>607 and <class>input</class> were add to <mod>ll.xist.ns.doc</mod>.</ item>608 609 < item>The method <meth>ll.xist.xsc.Attrs.set</meth> now returns the610 new attribute object.</ item>611 612 < item>The <meth>visit</meth> method has been removed.</item>613 614 < item><meth>ll.xist.xsc.FindOld</meth> has been removed.</item>615 616 < item><class>ll.xist.ns.xml.header</class> has been renamed to617 <class>ll.xist.ns.xml.declaration</class>.</ item>601 encountered.</li> 602 603 <li>The script <filename>xscmake.py</filename> (which has been unmaintained 604 for a while now) has been removed.</li> 605 606 <li>Elements <class>hostname</class>, <class>tty</class>, <class>prompt</class> 607 and <class>input</class> were add to <mod>ll.xist.ns.doc</mod>.</li> 608 609 <li>The method <meth>ll.xist.xsc.Attrs.set</meth> now returns the 610 new attribute object.</li> 611 612 <li>The <meth>visit</meth> method has been removed.</li> 613 614 <li><meth>ll.xist.xsc.FindOld</meth> has been removed.</li> 615 616 <li><class>ll.xist.ns.xml.header</class> has been renamed to 617 <class>ll.xist.ns.xml.declaration</class>.</li> 618 618 619 619 </ul> … … 625 625 <ul> 626 626 627 < item>Specifying content models for elements has seen major enhancements. The627 <li>Specifying content models for elements has seen major enhancements. The 628 628 boolean class attribute <lit>empty</lit> has been replaced by an object 629 629 <lit>model</lit> whose <meth>checkvalid</meth> method will be called 630 for validating the element content.</ item>631 632 < item>A new module <mod>ll.xist.sims</mod> has been added that provides630 for validating the element content.</li> 631 632 <li>A new module <mod>ll.xist.sims</mod> has been added that provides 633 633 a simple schema validation. Schema violations will be reported via Pythons 634 warning framework.</ item>635 636 < item>All namespace modules have been updated to use <mod>sims</mod>634 warning framework.</li> 635 636 <li>All namespace modules have been updated to use <mod>sims</mod> 637 637 information. The &svg; module has been updated to &svg; 1.1. The docbook 638 module has been updated to DocBook 4.3.</ item>639 640 < item>It's possible to switch off validation during parsing and publishing.</item>641 642 < item><p><class>ll.xist.xsc.Frag</class> and <class>ll.xist.xsc.Element</class>638 module has been updated to DocBook 4.3.</li> 639 640 <li>It's possible to switch off validation during parsing and publishing.</li> 641 642 <li><p><class>ll.xist.xsc.Frag</class> and <class>ll.xist.xsc.Element</class> 643 643 both have a <meth>__call__</meth> method with the same arguments as 644 644 their constructors. Those methods will append content nodes (and set attributes … … 678 678 </example> 679 679 680 </ item>681 682 < item><p>Experimental support for Holger Krekel's680 </li> 681 682 <li><p>Experimental support for Holger Krekel's 683 683 <a href="http://codespeak.net/svn/user/hpk/talks/xpython-talk.txt">XPython</a> 684 684 has been added. Code might look like this:</p> … … 713 713 </prog> 714 714 </example> 715 </ item>716 717 < item>715 </li> 716 717 <li> 718 718 <p>Creating global attributes has been simplified. Passing an instance 719 719 of <class>ll.xist.xsc.Namespace.Attrs</class> to an <class>Element</class> … … 729 729 </prog> 730 730 </example> 731 </ item>732 733 < item>Creating skeleton implementations of &xist; namespaces is no longer done731 </li> 732 733 <li>Creating skeleton implementations of &xist; namespaces is no longer done 734 734 via &xml; conversion (i.e. the namespace module <mod>ll.xist.ns.xndl</mod>), 735 735 but through the new module <mod>ll.xist.xnd</mod>. The script 736 736 <filename>dtdxsc.py</filename> will automatically generate <mod>sims</mod> 737 information.</ item>738 739 < item><class>ll.xist.xsc.CharRef</class> now inherits from737 information.</li> 738 739 <li><class>ll.xist.xsc.CharRef</class> now inherits from 740 740 <class>ll.xist.xsc.Text</class> too, so you don't have to special case 741 741 <class>CharRef</class>s any more. When publishing, <class>CharRef</class>s 742 will be handled like <class>Text</class> nodes.</ item>743 744 < item><class>ll.xist.ns.meta.contenttype</class> now has an attribute742 will be handled like <class>Text</class> nodes.</li> 743 744 <li><class>ll.xist.ns.meta.contenttype</class> now has an attribute 745 745 <lit>mimetype</lit> (defaulting to <lit>"text/html"</lit>) for specifying 746 the &mime; type.</ item>747 748 < item><class>ll.xist.ns.htmlspecials.caps</class> has been removed.</item>749 750 < item>Registering elements in namespace classes has been rewritten to use751 a cache now.</ item>752 753 < item>Pretty printing has been changed: Whitespace will only be added now if754 there are no text nodes in element content.</ item>755 756 < item>Two mailing lists are now available: One for discussion about &xist;757 and one for &xist; announcements.</ item>746 the &mime; type.</li> 747 748 <li><class>ll.xist.ns.htmlspecials.caps</class> has been removed.</li> 749 750 <li>Registering elements in namespace classes has been rewritten to use 751 a cache now.</li> 752 753 <li>Pretty printing has been changed: Whitespace will only be added now if 754 there are no text nodes in element content.</li> 755 756 <li>Two mailing lists are now available: One for discussion about &xist; 757 and one for &xist; announcements.</li> 758 758 </ul> 759 759 </section> … … 762 762 <section><h>Changes in 2.4.1 (released 01/05/2004)</h> 763 763 <ul> 764 < item>Changed the xmlname of <class>ll.xist.ns.jsp.directive_page</class> back again765 (it's <lit>directive.page</lit> only for the &xml; form, which we don't use anyway.)</ item>766 767 < item>Drop the default value for <class>ll.xist.ns.jsp.directive_page.Attrs.language</class>,768 as this attribute can only be used once.</ item>769 770 < item>If an <class>ll.xist.xsc.Prefixes</class> object has a prefix mapping for764 <li>Changed the xmlname of <class>ll.xist.ns.jsp.directive_page</class> back again 765 (it's <lit>directive.page</lit> only for the &xml; form, which we don't use anyway.)</li> 766 767 <li>Drop the default value for <class>ll.xist.ns.jsp.directive_page.Attrs.language</class>, 768 as this attribute can only be used once.</li> 769 770 <li>If an <class>ll.xist.xsc.Prefixes</class> object has a prefix mapping for 771 771 a namespace it will return this prefix too, if asked for a prefix for a subclass 772 of this namespace.</ item>772 of this namespace.</li> 773 773 </ul> 774 774 </section> … … 777 777 <section><h>Changes in 2.4 (released 01/02/2004)</h> 778 778 <ul> 779 < item>The class <class>ll.xist.parsers.Handler</class> has been renamed to779 <li>The class <class>ll.xist.parsers.Handler</class> has been renamed to 780 780 <class>Parser</class> and has been made reusable, i.e. it is possible to 781 781 instantiate a parser once and use it multiple times for parsing. All the … … 785 785 to the various parsing functions are passed to the parser constructor now. 786 786 The basic parsing functionality is implemented by parsing streams instead of 787 <class>InputSource</class>s.</ item>788 < item>Similar to the changes for parsing, publishers have been changed to be787 <class>InputSource</class>s.</li> 788 <li>Similar to the changes for parsing, publishers have been changed to be 789 789 reusable and most arguments to the publishing functions are available as 790 arguments to the publisher constructor.</ item>791 < item>Now converter contexts are no longer bound to an element790 arguments to the publisher constructor.</li> 791 <li>Now converter contexts are no longer bound to an element 792 792 class, but to the context class defined by the element class, i.e. 793 793 the attribute <lit>Context</lit> of the argument for <meth>Converter.__getitem__</meth> 794 794 will be used as the dictionary key. This makes it possible to use a class 795 795 and it subclasses interchangeably (as long as the base class defines 796 its own <class>Context</class> class and the subclasses don't overwrite it).</ item>797 < item>Added a find functor <class>FindTypeAllAttrs</class> that798 searches content and attributes.</ item>799 < item>Fixed the &xml; name for <class>ll.xist.ns.jsp.directive_page</class>.</item>800 < item>All character references in <mod>ll.xist.ns.ihtml</mod>801 that exist in <mod>ll.xist.ns.chars</mod> too have been removed.</ item>796 its own <class>Context</class> class and the subclasses don't overwrite it).</li> 797 <li>Added a find functor <class>FindTypeAllAttrs</class> that 798 searches content and attributes.</li> 799 <li>Fixed the &xml; name for <class>ll.xist.ns.jsp.directive_page</class>.</li> 800 <li>All character references in <mod>ll.xist.ns.ihtml</mod> 801 that exist in <mod>ll.xist.ns.chars</mod> too have been removed.</li> 802 802 </ul> 803 803 </section> … … 806 806 <section><h>Changes in 2.3 (released 12/08/2003)</h> 807 807 <ul> 808 < item>It's now possible to parse &xml; without generating location808 <li>It's now possible to parse &xml; without generating location 809 809 information for each node, by passing <lit>loc=False</lit> to 810 the constructor of the <class>Handler</class>.</ item>811 < item>The <class>HTMLParser</class> no longer complains about812 global attributes or <lit>xmlns</lit>.</ item>813 < item>&xist; now supports <app moreinfo="http://utidylib.sf.net/">µTidylib</app>810 the constructor of the <class>Handler</class>.</li> 811 <li>The <class>HTMLParser</class> no longer complains about 812 global attributes or <lit>xmlns</lit>.</li> 813 <li>&xist; now supports <app moreinfo="http://utidylib.sf.net/">µTidylib</app> 814 814 in addition to <app>mxTidy</app>. If <app>µTidylib</app> is found 815 it is preferred over <app>mxTidy</app>.</ item>816 < item>It's possible now to pass arguments to tidy simple by815 it is preferred over <app>mxTidy</app>.</li> 816 <li>It's possible now to pass arguments to tidy simple by 817 817 passing an argument dictionary for the <arg>tidy</arg> argument 818 in the parsing functions.</ item>819 < item>The methods <meth>parsed</meth> and <meth>checkvalid</meth>820 have been separated.</ item>821 < item><class>ll.xist.ns.htmlspecials.pixel</class> and818 in the parsing functions.</li> 819 <li>The methods <meth>parsed</meth> and <meth>checkvalid</meth> 820 have been separated.</li> 821 <li><class>ll.xist.ns.htmlspecials.pixel</class> and 822 822 <class>ll.xist.ns.htmlspecials.autopixel</class> now check whether their 823 <lit>color</lit> attribute is ok.</ item>824 < item>The base &url; is now set correctly when parsing from an &url;823 <lit>color</lit> attribute is ok.</li> 824 <li>The base &url; is now set correctly when parsing from an &url; 825 825 even if the original &url; does a redirect. (This requires <mod>ll.url</mod> 826 version 0.11.3).</ item>827 < item>Namespace handling has been rewritten again, to be more standards826 version 0.11.3).</li> 827 <li>Namespace handling has been rewritten again, to be more standards 828 828 compliant: Now there is no prefixes for entities and processing instructions any longer. 829 829 Prefix mappings can be created much simpler, and they no longer contain any 830 830 namespace stack for parsing, as this is now done by the parser itself. 831 <class>xsc.NamespaceAttrMixIn</class> is gone too.</ item>832 < item>The processing instructions <class>exec_</class> and <class>eval_</class>831 <class>xsc.NamespaceAttrMixIn</class> is gone too.</li> 832 <li>The processing instructions <class>exec_</class> and <class>eval_</class> 833 833 from <mod>ll.xist.ns.code</mod> have been renamed to <class>pyexec</class> 834 and <class>pyeval</class> and <class>import_</class> has been removed.</ item>835 < item><class>CharRef</class>s from <mod>ll.xist.ns.html</mod> have been836 moved to a new module named <mod>ll.xist.ns.chars</mod>.</ item>837 < item>The method names <meth>beginPublication</meth>, <meth>endPublication</meth>838 and <meth>doPublication</meth> have been lowercased.</ item>834 and <class>pyeval</class> and <class>import_</class> has been removed.</li> 835 <li><class>CharRef</class>s from <mod>ll.xist.ns.html</mod> have been 836 moved to a new module named <mod>ll.xist.ns.chars</mod>.</li> 837 <li>The method names <meth>beginPublication</meth>, <meth>endPublication</meth> 838 and <meth>doPublication</meth> have been lowercased.</li> 839 839 </ul> 840 840 </section> … … 843 843 <section><h>Changes in 2.2 (released 07/31/2003)</h> 844 844 <ul> 845 < item><p>Namespace handling has been completely rewritten.845 <li><p>Namespace handling has been completely rewritten. 846 846 Namespaces are now classes derived from <class>ll.xist.xsc.Namespace</class>. 847 847 Defining element classes can be done inside or outside the namespace … … 898 898 <namespace foo/xmlns name=u'foo' url=u'http://www.foo.com/ns/foo' with 1 elements from 'foo.py' at 0x81bfc14> 899 899 </prog> 900 </ item>901 902 < item><func>getns</func> has been dropped, so you always900 </li> 901 902 <li><func>getns</func> has been dropped, so you always 903 903 have to pass in a <class>Namespace</class> class where a namespace 904 is required.</ item>905 906 < item>For the <class>ll.xist.ns.jsp.directive_page</class> element904 is required.</li> 905 906 <li>For the <class>ll.xist.ns.jsp.directive_page</class> element 907 907 automatic generation of the correct <lit>charset</lit> option 908 908 in the <lit>contentType</lit> attribute is only done when there 909 909 is a <lit>contentType</lit> attribute, as <lit>contentType</lit> 910 is optional.</ item>911 912 < item>The converter has a new property <func>node</func>.910 is optional.</li> 911 912 <li>The converter has a new property <func>node</func>. 913 913 <arg>node</arg> can't be passed to <meth>conv</meth> but 914 914 will be set to <self/> by <meth>conv</meth> automatically. 915 915 This makes it possible to access the <z>document root</z> 916 during conversion.</ item>917 918 < item><class>ll.xist.ns.htmlspecials.autoimg</class> no longer touches916 during conversion.</li> 917 918 <li><class>ll.xist.ns.htmlspecials.autoimg</class> no longer touches 919 919 existing width and height attributes. This means that %-formatting 920 of the existing attributes is no longer done.</ item>921 922 < item>Added a new class <class>ll.xist.ns.htmlspecials.autopixel</class>920 of the existing attributes is no longer done.</li> 921 922 <li>Added a new class <class>ll.xist.ns.htmlspecials.autopixel</class> 923 923 that works like <class>ll.xist.ns.htmlspecials.pixel</class> but 924 924 inherits the size for the image specified via the <lit>src</lit> 925 attribute.</ item>926 927 < item><class>Frag</class> and <class>Element</class> now support928 extended slices.</ item>929 930 < item><class>Frag</class> and <class>Element</class> now support931 the methods <meth>extend</meth> and <meth>__iadd__</meth>.</ item>932 933 < item>For walking the tree the method <meth>walk</meth> has been completely925 attribute.</li> 926 927 <li><class>Frag</class> and <class>Element</class> now support 928 extended slices.</li> 929 930 <li><class>Frag</class> and <class>Element</class> now support 931 the methods <meth>extend</meth> and <meth>__iadd__</meth>.</li> 932 933 <li>For walking the tree the method <meth>walk</meth> has been completely 934 934 rewritten and a new method <meth>visit</meth> has been added. For 935 more info see the docstrings.</ item>936 937 < item><class>Node</class> now has two new methods <meth>copy</meth>935 more info see the docstrings.</li> 936 937 <li><class>Node</class> now has two new methods <meth>copy</meth> 938 938 and <meth>deepcopy</meth> and supports the <mod>copy</mod> 939 module from the Python standard library.</ item>940 941 < item>Calling <meth>mapped</meth> through <meth>conv</meth> has939 module from the Python standard library.</li> 940 941 <li>Calling <meth>mapped</meth> through <meth>conv</meth> has 942 942 been removed. You again have to call <meth>mapped</meth> directly 943 and pass a node and a converter.</ item>944 945 < item>The &html; handling of the <class>HTMLParser</class> has been improved943 and pass a node and a converter.</li> 944 945 <li>The &html; handling of the <class>HTMLParser</class> has been improved 946 946 (it now uses code from <mod>xml.sax.drivers2.drv_sgmlop_html</mod> (which 947 is part of <a href="http://pyxml.sf.net">PyXML</a>)).</ item>948 949 < item>The core functionality found in the script <filename>dtd2xsc.py</filename>947 is part of <a href="http://pyxml.sf.net">PyXML</a>)).</li> 948 949 <li>The core functionality found in the script <filename>dtd2xsc.py</filename> 950 950 has been moved to a class method <meth>ll.xist.ns.xndl.fromdtd</meth> in the 951 <mod>ll.xist.ns.xndl</mod> namespace.</ item>952 953 < item><class>ll.xist.parsers.ExpatParser</class> is now a real subclass951 <mod>ll.xist.ns.xndl</mod> namespace.</li> 952 953 <li><class>ll.xist.parsers.ExpatParser</class> is now a real subclass 954 954 instead of an alias for <class>xml.sax.expatreader.ExpatParser</class> 955 955 It reports unknown entity references to the application (if loading 956 956 of external entities is switched off, which is done by 957 <class>ll.xist.parsers.Handler</class> and only outside of attributes).</ item>958 959 < item>Namespaces have been added for Zope's TAL and METAL specifications.</item>960 961 < item>A namespace has been added for <a href="http://www.w3.org/Style/XSL/">XSL-FO</a>.</item>957 <class>ll.xist.parsers.Handler</class> and only outside of attributes).</li> 958 959 <li>Namespaces have been added for Zope's TAL and METAL specifications.</li> 960 961 <li>A namespace has been added for <a href="http://www.w3.org/Style/XSL/">XSL-FO</a>.</li> 962 962 </ul> 963 963 </section> … … 966 966 <section><h>Changes in 2.1.4 (released 06/13/2003)</h> 967 967 <ul> 968 < item>Remove the checks for attributes in attributes and968 <li>Remove the checks for attributes in attributes and 969 969 moved the publication code for the full element into a separate 970 970 method. This allows &jsp; tag library namespaces to simply 971 971 overwrite <meth>publish</meth> to publish the element 972 even inside attributes. (This is the same fix as in release 1.5.10)</ item>972 even inside attributes. (This is the same fix as in release 1.5.10)</li> 973 973 </ul> 974 974 </section> … … 977 977 <section><h>Changes in 2.1.3 (released 05/07/2003)</h> 978 978 <ul> 979 < item>The methods <meth>sorted</meth>, <meth>reversed</meth>979 <li>The methods <meth>sorted</meth>, <meth>reversed</meth> 980 980 and <meth>shuffled</meth> have been rewritten so they no longer 981 981 use <lit>sys.maxint</lit>. This change fixes those methods for 982 64 bit platforms (reported by Giles Frances Hall)</ item>982 64 bit platforms (reported by Giles Frances Hall)</li> 983 983 </ul> 984 984 </section> … … 987 987 <section><h>Changes in 2.1.2 (released 02/27/2003)</h> 988 988 <ul> 989 < item><class>ll.xist.ns.struts_config11.plug_in</class> now989 <li><class>ll.xist.ns.struts_config11.plug_in</class> now 990 990 allows content (as the &dtd; states). (This is the same fix 991 as in release 1.5.8.)</ item>991 as in release 1.5.8.)</li> 992 992 </ul> 993 993 </section> … … 996 996 <section><h>Changes in 2.1.1 (released 02/11/2003)</h> 997 997 <ul> 998 < item>Added a few elements and attributes to <mod>ll.xist.ns.doc</mod>:998 <li>Added a few elements and attributes to <mod>ll.xist.ns.doc</mod>: 999 999 <class>username</class>, which is used for the name of a user account, 1000 1000 <class>xref</class>, which is used for internal cross references and 1001 1001 the attribute <lit>id</lit> for <class>section</class>, which specifies 1002 the target for an <class>xref</class>.</ item>1002 the target for an <class>xref</class>.</li> 1003 1003 </ul> 1004 1004 </section> … … 1007 1007 <section><h>Changes in 2.1 (released 12/09/2002)</h> 1008 1008 <ul> 1009 < item>Added a new namespace module <mod>ll.xist.ns.xndl</mod>1009 <li>Added a new namespace module <mod>ll.xist.ns.xndl</mod> 1010 1010 that contains the <z>&xist; namespace definition language</z>, i.e. 1011 1011 elements that describe an &xist; namespace and can be used by 1012 1012 various scripts to generate skeleton namespace modules. 1013 1013 The first of these script is the &dtd; to namespace converter 1014 <filename>dtd2xsc.py</filename>.</ item>1015 < item>Added a new namespace module <mod>ll.xist.ns.tld</mod>1014 <filename>dtd2xsc.py</filename>.</li> 1015 <li>Added a new namespace module <mod>ll.xist.ns.tld</mod> 1016 1016 that contains the definition for Java Server Pages Tag Library 1017 1017 descriptors and a script <filename>tld2xsc.py</filename> 1018 1018 that uses this namespace to generate namespace modules from 1019 <lit>tld</lit> files.</ item>1020 < item><class>Attr</class> now supports the method1019 <lit>tld</lit> files.</li> 1020 <li><class>Attr</class> now supports the method 1021 1021 <meth>filtered</meth>. This is used by <meth>without</meth> 1022 1022 now. The arguments for <meth>without</meth> have changed, … … 1024 1024 A new method <meth>with</meth> has been added, with does 1025 1025 the opposite of <meth>without</meth>, i.e. it removes all 1026 attributes that are not specified as parameters.</ item>1027 < item>The Python name of each <class>Node</class> subclass1028 is now available as the class attribute <lit>pyname</lit>.</ item>1029 < item>To continue the great renaming <meth>withSep</meth>1030 has been renamed to <meth>withsep</meth>.</ item>1031 < item>The namespace name for the <mod>ll.xist.ns.struts_html</mod>1032 module has been fixed.</ item>1033 < item>The argument <arg>defaultEncoding</arg> for the various1034 parsing functions has been renamed to <arg>encoding</arg>.</ item>1026 attributes that are not specified as parameters.</li> 1027 <li>The Python name of each <class>Node</class> subclass 1028 is now available as the class attribute <lit>pyname</lit>.</li> 1029 <li>To continue the great renaming <meth>withSep</meth> 1030 has been renamed to <meth>withsep</meth>.</li> 1031 <li>The namespace name for the <mod>ll.xist.ns.struts_html</mod> 1032 module has been fixed.</li> 1033 <li>The argument <arg>defaultEncoding</arg> for the various 1034 parsing functions has been renamed to <arg>encoding</arg>.</li> 1035 1035 </ul> 1036 1036 </section> … … 1039 1039 <section><h>Changes in 2.0.8 (released 11/20/2002)</h> 1040 1040 <ul> 1041 < item><func>ll.xist.ns.doc.getDoc</func> has been renamed1042 to <func>getdoc</func>.</ item>1043 < item>The &css; parser was dropping the <lit>%</lit> from1044 percentage values. This has been fixed.</ item>1041 <li><func>ll.xist.ns.doc.getDoc</func> has been renamed 1042 to <func>getdoc</func>.</li> 1043 <li>The &css; parser was dropping the <lit>%</lit> from 1044 percentage values. This has been fixed.</li> 1045 1045 </ul> 1046 1046 </section> … … 1049 1049 <section><h>Changes in 2.0.7 (released 11/12/2002)</h> 1050 1050 <ul> 1051 < item><meth>xsc.Element.__nonzero__</meth> can no longer fall back1051 <li><meth>xsc.Element.__nonzero__</meth> can no longer fall back 1052 1052 to <meth>xsc.Frag.__nonzero__</meth>. 1053 (this is the same fix as in 1.5.7).</ item>1053 (this is the same fix as in 1.5.7).</li> 1054 1054 </ul> 1055 1055 </section> … … 1058 1058 <section><h>Changes in 2.0.6 (released 11/11/2002)</h> 1059 1059 <ul> 1060 < item>Performance optimizations.</item>1060 <li>Performance optimizations.</li> 1061 1061 </ul> 1062 1062 </section> … … 1065 1065 <section><h>Changes in 2.0.5 (released 11/11/2002)</h> 1066 1066 <ul> 1067 < item>Fixed a bug in <class>ll.xist.ns.specials.autoimg</class>:1067 <li>Fixed a bug in <class>ll.xist.ns.specials.autoimg</class>: 1068 1068 Attributes were not converted before the size check was done 1069 (this is the same fix as in 1.5.5).</ item>1069 (this is the same fix as in 1.5.5).</li> 1070 1070 </ul> 1071 1071 </section> … … 1074 1074 <section><h>Changes in 2.0.4 (released 11/08/2002)</h> 1075 1075 <ul> 1076 < item>Fixed a regression bug in <class>ll.xist.ns.jsp.directive</class>1077 and several documentation issues.</ item>1076 <li>Fixed a regression bug in <class>ll.xist.ns.jsp.directive</class> 1077 and several documentation issues.</li> 1078 1078 </ul> 1079 1079 </section> … … 1082 1082 <section><h>Changes in 2.0.3 (released 10/30/2002)</h> 1083 1083 <ul> 1084 < item>Fixed a few bugs in <class>HTMLParser</class>.</item>1085 < item>Added DocBook conversion for several elements1086 in <mod>ll.xist.ns.doc</mod>.</ item>1087 < item>Now the <filename>__init__.py</filename> file for the1088 <mod>ll</mod> package is included.</ item>1084 <li>Fixed a few bugs in <class>HTMLParser</class>.</li> 1085 <li>Added DocBook conversion for several elements 1086 in <mod>ll.xist.ns.doc</mod>.</li> 1087 <li>Now the <filename>__init__.py</filename> file for the 1088 <mod>ll</mod> package is included.</li> 1089 1089 </ul> 1090 1090 </section> … … 1093 1093 <section><h>Changes in 2.0.2 (released 10/21/2002)</h> 1094 1094 <ul> 1095 < item>Fixed a bug in <meth>Frag.__rmul__</meth> (by1096 reusing <meth>__mul__</meth>).</ item>1097 < item>Fixed a bug with the backwards compatible prefix1095 <li>Fixed a bug in <meth>Frag.__rmul__</meth> (by 1096 reusing <meth>__mul__</meth>).</li> 1097 <li>Fixed a bug with the backwards compatible prefix 1098 1098 mapping: Defining element classes in <lit>exec</lit> processing 1099 1099 instructions didn't work, because the prefixes object used for … … 1102 1102 for the <arg>prefixes</arg> argument in calls to the parsing 1103 1103 functions uses one global shared <class>Prefixes</class> instances 1104 where all the namespaces that are newly defined will be registered too.</ item>1104 where all the namespaces that are newly defined will be registered too.</li> 1105 1105 </ul> 1106 1106 </section> … … 1109 1109 <section><h>Changes in 2.0.1 (released 10/17/2002)</h> 1110 1110 <ul> 1111 < item>Fixed <filename>xscmake.py</filename> by removing the1111 <li>Fixed <filename>xscmake.py</filename> by removing the 1112 1112 prefix handling. <class>OldPrefixes</class> will always 1113 be used for parsing now.</ item>1113 be used for parsing now.</li> 1114 1114 </ul> 1115 1115 </section> … … 1118 1118 <section><h>Changes in 2.0 (released 10/16/2002)</h> 1119 1119 <ul> 1120 < item>&xist; now requires at least Python 2.2.1.</item>1121 < item>Attribute handling has been largely rewritten. Instead of1120 <li>&xist; now requires at least Python 2.2.1.</li> 1121 <li>Attribute handling has been largely rewritten. Instead of 1122 1122 a class attribute <lit>attrHandlers</lit>, the attributes 1123 1123 are now defined through a nested class named <class>Attrs</class> … … 1133 1133 allowed values for the attribute via <lit>values</lit>, 1134 1134 which is a list of allowed values, and whether the attribute is 1135 required or not via <lit>required</lit>.</ item>1136 < item>&xist; now has real namespace support. The new class1135 required or not via <lit>required</lit>.</li> 1136 <li>&xist; now has real namespace support. The new class 1137 1137 <class>ll.xist.xsc.Prefixes</class> can be used to define a 1138 1138 mapping between prefixes and namespace names. This can be 1139 1139 used for parsing and publishing. Namespace support is even 1140 available for entities and processing instruction.</ item>1141 < item>Global attributes are supported now. Namespace modules1140 available for entities and processing instruction.</li> 1141 <li>Global attributes are supported now. Namespace modules 1142 1142 for the <lit>xml</lit> and <lit>xlink</lit> namespaces 1143 1143 have been added (and <class>ll.xist.xsc.XML</class> was 1144 moved to <mod>ll.xist.ns.xml</mod>).</ item>1145 < item>A new namespace module for &svg; 1.0 has been added: <mod>ll.xist.ns.svg</mod>.</item>1146 < item>The &html; specific parts of <mod>ll.xist.ns.specials</mod>1147 have been split off into a separate module <mod>ll.xist.ns.htmlspecials</mod>.</ item>1148 < item>Comparison of attributes with strings has been removed.1144 moved to <mod>ll.xist.ns.xml</mod>).</li> 1145 <li>A new namespace module for &svg; 1.0 has been added: <mod>ll.xist.ns.svg</mod>.</li> 1146 <li>The &html; specific parts of <mod>ll.xist.ns.specials</mod> 1147 have been split off into a separate module <mod>ll.xist.ns.htmlspecials</mod>.</li> 1148 <li>Comparison of attributes with strings has been removed. 1149 1149 You have to use <meth>__unicode__</meth> or <meth>__str__</meth> 1150 now before comparing.</ item>1151 < item>The <class>HTMLParser</class> now removes unknown attributes1152 instead of complaining.</ item>1153 < item>There is a new parser class <class>BadEntityParser</class>, which1150 now before comparing.</li> 1151 <li>The <class>HTMLParser</class> now removes unknown attributes 1152 instead of complaining.</li> 1153 <li>There is a new parser class <class>BadEntityParser</class>, which 1154 1154 is a &sax;2 parser that recognizes the character entities 1155 1155 defined in &html; and tries to pass on unknown or malformed 1156 entities to the handler literally.</ item>1157 < item>To give all nodes a chance to do something after they have been parsed1156 entities to the handler literally.</li> 1157 <li>To give all nodes a chance to do something after they have been parsed 1158 1158 (e.g. to prepend the base &url; for <class>URLAttr</class> nodes), the parser 1159 1159 now calls the method <meth>parsed</meth> immediately after node creation. 1160 1160 This is used for the new class <class>StyleAttr</class>, which uses the 1161 1161 <class>CSSTokenizer</class>, to prepend the base &url; to all &url;s 1162 found in a style attribute.</ item>1163 < item>The pixel images have been moved to the directory <dirname>px</dirname>1164 to make image &url;s shorter.</ item>1162 found in a style attribute.</li> 1163 <li>The pixel images have been moved to the directory <dirname>px</dirname> 1164 to make image &url;s shorter.</li> 1165 1165 </ul> 1166 1166 </section> … … 1169 1169 <section><h>Changes in 1.6.1 (released 08/25/2003)</h> 1170 1170 <ul> 1171 < item>Updated to work with newer versions of <mod>ll.ansistyle</mod>.</item>1172 < item>Updated the namespaces <mod>ll.xist.ns.struts_html</mod> and1173 <mod>ll.xist.ns.struts_config11</mod> to the state of Struts 1.1 final.</ item>1171 <li>Updated to work with newer versions of <mod>ll.ansistyle</mod>.</li> 1172 <li>Updated the namespaces <mod>ll.xist.ns.struts_html</mod> and 1173 <mod>ll.xist.ns.struts_config11</mod> to the state of Struts 1.1 final.</li> 1174 1174 </ul> 1175 1175 </section> … … 1178 1178 <section><h>Changes in 1.6 (released 07/02/2003)</h> 1179 1179 <ul> 1180 < item>Removed the default value for the <lit>className</lit> attribute1181 in <class>ll.xist.ns.struts_config11.action</class>.</ item>1182 < item>Added an attribute <lit>type</lit> to1183 <class>ll.xist.ns.struts_config11.action_mapping</class>.</ item>1180 <li>Removed the default value for the <lit>className</lit> attribute 1181 in <class>ll.xist.ns.struts_config11.action</class>.</li> 1182 <li>Added an attribute <lit>type</lit> to 1183 <class>ll.xist.ns.struts_config11.action_mapping</class>.</li> 1184 1184 </ul> 1185 1185 </section> … … 1188 1188 <section><h>Changes in 1.5.13 (released 07/01/2003)</h> 1189 1189 <ul> 1190 < item>Implemented <meth>ll.xist.xsc.Namespace.__eq__</meth>,1191 so that replacing a namespace in the registry really works.</ item>1192 < item>Added an attribute <lit>target</lit> to <class>ll.xist.ns.html.area</class>.</item>1190 <li>Implemented <meth>ll.xist.xsc.Namespace.__eq__</meth>, 1191 so that replacing a namespace in the registry really works.</li> 1192 <li>Added an attribute <lit>target</lit> to <class>ll.xist.ns.html.area</class>.</li> 1193 1193 </ul> 1194 1194 </section> … … 1197 1197 <section><h>Changes in 1.5.12 (released 06/17/2003)</h> 1198 1198 <ul> 1199 < item>Fixed a bug in the new <mod>ll.xist.ns.jsp</mod>.</item>1199 <li>Fixed a bug in the new <mod>ll.xist.ns.jsp</mod>.</li> 1200 1200 </ul> 1201 1201 </section> … … 1204 1204 <section><h>Changes in 1.5.11 (released 06/13/2003)</h> 1205 1205 <ul> 1206 < item>Updated <mod>ll.xist.ns.jsp</mod> to &jsp; 1.2.</item>1206 <li>Updated <mod>ll.xist.ns.jsp</mod> to &jsp; 1.2.</li> 1207 1207 </ul> 1208 1208 </section> … … 1211 1211 <section><h>Changes in 1.5.10 (released 06/13/2003)</h> 1212 1212 <ul> 1213 < item>Remove the checks for attributes in attributes and1213 <li>Remove the checks for attributes in attributes and 1214 1214 moved the publication code for the full element into a separate 1215 1215 method. This allows &jsp; tag library namespaces to simply 1216 1216 overwrite <meth>publish</meth> to publish the element 1217 even inside attributes.</ item>1217 even inside attributes.</li> 1218 1218 </ul> 1219 1219 </section> … … 1222 1222 <section><h>Changes in 1.5.9 (released 04/30/2003)</h> 1223 1223 <ul> 1224 < item>Reregistering a namespace now properly overwrites1225 the old version in <lit>xsc.namespaceRegistry</lit>.</ item>1224 <li>Reregistering a namespace now properly overwrites 1225 the old version in <lit>xsc.namespaceRegistry</lit>.</li> 1226 1226 </ul> 1227 1227 </section> … … 1230 1230 <section><h>Changes in 1.5.8 (released 02/27/2003)</h> 1231 1231 <ul> 1232 < item><class>ll.xist.ns.struts_config11.plug_in</class> now1233 allows content (as the &dtd; states).</ item>1232 <li><class>ll.xist.ns.struts_config11.plug_in</class> now 1233 allows content (as the &dtd; states).</li> 1234 1234 </ul> 1235 1235 </section> … … 1238 1238 <section><h>Changes in 1.5.7 (released 11/12/2002)</h> 1239 1239 <ul> 1240 < item><meth>xsc.Element.__nonzero__</meth> can no longer fall back1241 to <meth>xsc.Frag.__nonzero__</meth>.</ item>1240 <li><meth>xsc.Element.__nonzero__</meth> can no longer fall back 1241 to <meth>xsc.Frag.__nonzero__</meth>.</li> 1242 1242 </ul> 1243 1243 </section> … … 1246 1246 <section><h>Changes in 1.5.6 (released 11/11/2002)</h> 1247 1247 <ul> 1248 < item>Performance optimizations.</item>1248 <li>Performance optimizations.</li> 1249 1249 </ul> 1250 1250 </section> … … 1253 1253 <section><h>Changes in 1.5.5 (released 11/11/2002)</h> 1254 1254 <ul> 1255 < item>Fixed a bug in <class>ll.xist.ns.specials.autoimg</class>:1256 Attributes were not converted before the size check was done.</ item>1255 <li>Fixed a bug in <class>ll.xist.ns.specials.autoimg</class>: 1256 Attributes were not converted before the size check was done.</li> 1257 1257 </ul> 1258 1258 </section> … … 1261 1261 <section><h>Changes in 1.5.4 (released 09/30/2002)</h> 1262 1262 <ul> 1263 < item><filename>xscmake.py</filename> now tries to strip off1263 <li><filename>xscmake.py</filename> now tries to strip off 1264 1264 a trailing <lit>xsc</lit> from the filename before it falls back 1265 1265 to the extension <lit>html</lit> (The builtin extension mapping 1266 is still tried first).</ item>1266 is still tried first).</li> 1267 1267 </ul> 1268 1268 </section> … … 1271 1271 <section><h>Changes in 1.5.3 (released 09/25/2002)</h> 1272 1272 <ul> 1273 < item>Added new processing instruction class <class>ll.xist.ns.php.expression</class>1274 that generates a &php; <lit>print</lit> statement from its content.</ item>1273 <li>Added new processing instruction class <class>ll.xist.ns.php.expression</class> 1274 that generates a &php; <lit>print</lit> statement from its content.</li> 1275 1275 </ul> 1276 1276 </section> … … 1279 1279 <section><h>Changes in 1.5.2 (released 09/19/2002)</h> 1280 1280 <ul> 1281 < item>Removed the <lit>value</lit> magic from1281 <li>Removed the <lit>value</lit> magic from 1282 1282 <class>ll.xist.ns.form.checkbox</class> as this 1283 conflicted with dynamic <lit>value</lit> values.</ item>1283 conflicted with dynamic <lit>value</lit> values.</li> 1284 1284 </ul> 1285 1285 </section> … … 1288 1288 <section><h>Changes in 1.5.1 (released 09/17/2002)</h> 1289 1289 <ul> 1290 < item>Comparison of attributes with strings has been removed.1290 <li>Comparison of attributes with strings has been removed. 1291 1291 You have to use <meth>__unicode__</meth> or <meth>__str__</meth> 1292 instead.</ item>1293 < item>The <class>HTMLParser</class> now removes unknown attributes1294 instead of complaining.</ item>1295 < item>There is a new parser class <class>BadEntityParser</class>, which1292 instead.</li> 1293 <li>The <class>HTMLParser</class> now removes unknown attributes 1294 instead of complaining.</li> 1295 <li>There is a new parser class <class>BadEntityParser</class>, which 1296 1296 is a &sax;2 parser that recognizes the character entities 1297 1297 defined in &html; and tries to pass on unknown or malformed 1298 entities to the handler literally.</ item>1299 < item>To give all nodes a chance to do something after they have been parsed1298 entities to the handler literally.</li> 1299 <li>To give all nodes a chance to do something after they have been parsed 1300 1300 (e.g. to prepend the base URL for <class>URLAttr</class> nodes), the parser 1301 1301 now calls the method <meth>parsed()</meth> immediately after node creation. 1302 1302 This is used for the new class <class>StyleAttr</class>, which uses the 1303 1303 <class>CSSTokenizer</class>, to prepend the base url to all urls found in 1304 a style attribute.</ item>1305 < item>The <class>HTMLParser</class> now removes unknown attributes1306 instead of complaining.</ item>1307 < item>There is a new parser class <class>BadEntityParser</class>, which1304 a style attribute.</li> 1305 <li>The <class>HTMLParser</class> now removes unknown attributes 1306 instead of complaining.</li> 1307 <li>There is a new parser class <class>BadEntityParser</class>, which 1308 1308 is a &sax;2 parser that recognizes the character entities 1309 1309 defined in &html; and tries to pass on unknown or malformed 1310 entities to the handler literally.</ item>1311 < item>To give all nodes a chance to do something after they have been parsed1310 entities to the handler literally.</li> 1311 <li>To give all nodes a chance to do something after they have been parsed 1312 1312 (e.g. to prepend the base &url; for <class>URLAttr</class> nodes), the parser 1313 1313 now calls the method <meth>parsed</meth> immediately after node creation. 1314 1314 This is used for the new class <class>StyleAttr</class>, which uses the 1315 1315 <class>CSSTokenizer</class>, to prepend to base &url; to all &url;s 1316 found in a style attribute.</ item>1316 found in a style attribute.</li> 1317 1317 </ul> 1318 1318 </section> … … 1321 1321 <section><h>Changes in 1.4.3 (released 04/29/2002)</h> 1322 1322 <ul> 1323 < item>New namespace module <mod>xist.ns.struts_config11</mod>1323 <li>New namespace module <mod>xist.ns.struts_config11</mod> 1324 1324 allows to parse and modify <a href="http://jakarta.apache.org/struts/">Struts</a> 1325 1325 configuration files conforming to the 1326 1326 <a href="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">Struts 1.1 DTD</a>. 1327 </ item>1327 </li> 1328 1328 </ul> 1329 1329 </section> … … 1332 1332 <section><h>Changes in 1.4.2 (released 03/22/2002)</h> 1333 1333 <ul> 1334 < item>Updated <filename>xscmake.py</filename> to be compatible with the new1335 <mod>url</mod> module.</ item>1336 < item><class>xist.ns.jsp.directive_page</class> now automatically sets the1337 <lit>contentType</lit> on publishing.</ item>1334 <li>Updated <filename>xscmake.py</filename> to be compatible with the new 1335 <mod>url</mod> module.</li> 1336 <li><class>xist.ns.jsp.directive_page</class> now automatically sets the 1337 <lit>contentType</lit> on publishing.</li> 1338 1338 </ul> 1339 1339 </section> … … 1342 1342 <section><h>Changes in 1.4.1 (released 03/21/2002)</h> 1343 1343 <ul> 1344 < item>Removed <class>TidyURLInputSource</class>. Now it's possible1344 <li>Removed <class>TidyURLInputSource</class>. Now it's possible 1345 1345 to pass a <lit>tidy</lit> flag to the remaining functions <func>parseString</func>, 1346 1346 <func>parseFile</func> and <func>parseURL</func> to specify whether 1347 the source should be tidied.</ item>1348 < item>To prevent an element from being registered in a <class>Namespace</class>1347 the source should be tidied.</li> 1348 <li>To prevent an element from being registered in a <class>Namespace</class> 1349 1349 the class attribute <lit>register</lit> can be used now. This makes 1350 it possible to have a name for the element even when it's not registered.</ item>1351 < item><mod>xist.ns.form</mod> elements now have all the attributes that the1352 corresponding elements from <mod>xist.ns.html</mod> have.</ item>1353 < item>Removed the old <mod>xist.url</mod> from the Windows distribution.</item>1350 it possible to have a name for the element even when it's not registered.</li> 1351 <li><mod>xist.ns.form</mod> elements now have all the attributes that the 1352 corresponding elements from <mod>xist.ns.html</mod> have.</li> 1353 <li>Removed the old <mod>xist.url</mod> from the Windows distribution.</li> 1354 1354 </ul> 1355 1355 </section> … … 1358 1358 <section><h>Changes in 1.4 (released 03/18/2002)</h> 1359 1359 <ul> 1360 < item>Reimplemented &url; handling again. Now the new global1361 module <mod>url</mod> is used for that.</ item>1360 <li>Reimplemented &url; handling again. Now the new global 1361 module <mod>url</mod> is used for that.</li> 1362 1362 </ul> 1363 1363 </section> … … 1366 1366 <section><h>Changes in 1.3.1 (released 03/14/2002)</h> 1367 1367 <ul> 1368 < item>Added a method <meth>pretty</meth> to <class>Node</class>1369 for generating a pretty printable version of the node.</ item>1370 < item><lit>xsc.Node.name</lit> no longer is a class method, but a1368 <li>Added a method <meth>pretty</meth> to <class>Node</class> 1369 for generating a pretty printable version of the node.</li> 1370 <li><lit>xsc.Node.name</lit> no longer is a class method, but a 1371 1371 class attribute, that will be set at class instantiation time 1372 by the meta class.</ item>1372 by the meta class.</li> 1373 1373 </ul> 1374 1374 </section> … … 1377 1377 <section><h>Changes in 1.3 (released 02/12/2002)</h> 1378 1378 <ul> 1379 < item>Ported to Python 2.2. <class>Node</class> is now derived from1379 <li>Ported to Python 2.2. <class>Node</class> is now derived from 1380 1380 <class>object</class>, <class>Frag</class> from <class>list</class> and 1381 1381 there's a new class <class>Attrs</class> which is derived from … … 1384 1384 In addition to the usual dictionary methods and operators <class>Attrs</class> 1385 1385 has a method <meth>without</meth> that returns a copy of the 1386 <class>Attrs</class> instance with some specified attributes removed.</ item>1387 < item>All the node classes now have a new method <meth>walk</meth> that generates1388 all nodes in the tree using the new generator feature of Python 2.2.</ item>1389 < item>Also a new method <meth>walkPath</meth> has been added that works the1386 <class>Attrs</class> instance with some specified attributes removed.</li> 1387 <li>All the node classes now have a new method <meth>walk</meth> that generates 1388 all nodes in the tree using the new generator feature of Python 2.2.</li> 1389 <li>Also a new method <meth>walkPath</meth> has been added that works the 1390 1390 same as <meth>walk</meth> but yields the complete path to each node 1391 as a list.</ item>1392 < item>Added a class <class>block</class> to <mod>xist.ns.jsp</mod>.1391 as a list.</li> 1392 <li>Added a class <class>block</class> to <mod>xist.ns.jsp</mod>. 1393 1393 The content of the <class>block</class> instance will simply be enclosed 1394 1394 in a <lit>{}</lit> block. <mod>xist.ns.php</mod> got such 1395 a class too.</ item>1396 < item>Added a new module <mod>xist.ns.ihtml</mod> for1397 i-mode &html;.</ item>1398 < item>Added new modules <mod>xist.ns.css</mod> and1399 <mod>xist.ns.cssspecials</mod> for generating &css;.</ item>1400 < item>Now the various attributes of the <class>Converter</class> object1395 a class too.</li> 1396 <li>Added a new module <mod>xist.ns.ihtml</mod> for 1397 i-mode &html;.</li> 1398 <li>Added new modules <mod>xist.ns.css</mod> and 1399 <mod>xist.ns.cssspecials</mod> for generating &css;.</li> 1400 <li>Now the various attributes of the <class>Converter</class> object 1401 1401 are collected in a <class>ConverterState</class> object and it's possible 1402 1402 to push and pop those states, i.e. it's now easy to temporarily modify a 1403 1403 converter object during a <meth>convert</meth> call and revert back 1404 to a previous state afterwards.</ item>1405 < item><func>parseURL</func> and <func>parseTidyURL</func>1404 to a previous state afterwards.</li> 1405 <li><func>parseURL</func> and <func>parseTidyURL</func> 1406 1406 now have an additional parameter <lit>headers</lit> which is a list of 1407 1407 string pairs specifying additional headers to be passed in with the 1408 request.</ item>1409 < item><func>parseString</func> has an additional parameter1408 request.</li> 1409 <li><func>parseString</func> has an additional parameter 1410 1410 <lit>systemId</lit> which will be the system id of the 1411 <class>InputSource</class>.</ item>1412 < item>The distribution now includes the makefile and the &xml;1413 source files so now the distribution can rebuild ifself.</ item>1414 < item>Various other small bugfixes and enhancements.</item>1411 <class>InputSource</class>.</li> 1412 <li>The distribution now includes the makefile and the &xml; 1413 source files so now the distribution can rebuild ifself.</li> 1414 <li>Various other small bugfixes and enhancements.</li> 1415 1415 </ul> 1416 1416 </section> … … 1419 1419 <section><h>Changes in 1.2.5 (released 12/03/2001)</h> 1420 1420 <ul> 1421 < item>Added a new element <class>contentscripttype</class> to1421 <li>Added a new element <class>contentscripttype</class> to 1422 1422 <mod>xist.ns.meta</mod> that generates a 1423 1423 <lit><meta http-equiv="Content-Script-Type" ...></lit> 1424 element.</ item>1425 < item><func>xist.ns.doc.explain</func> now generates anchor elements1424 element.</li> 1425 <li><func>xist.ns.doc.explain</func> now generates anchor elements 1426 1426 for the class, function and method description, so now the 1427 links on the &xist; webpages work.</ item>1428 < item>Docstrings and documentation has been reworked. Now1427 links on the &xist; webpages work.</li> 1428 <li>Docstrings and documentation has been reworked. Now 1429 1429 <class>xist.ns.doc.pyref</class> no longer implies a font change. 1430 1430 Use the classes <class>xist.ns.doc.module</class>, <class>xist.ns.doc.class</class>, 1431 1431 <class>xist.ns.doc.method</class>, <class>xist.ns.doc.function</class> and 1432 <class>xist.ns.doc.arg</class> to mark up your Python identifiers.</ item>1433 < item>Added the attributes <lit>type</lit> and <lit>key</lit>1434 to <class>xist.ns.struts_config.data_source</class>.</ item>1432 <class>xist.ns.doc.arg</class> to mark up your Python identifiers.</li> 1433 <li>Added the attributes <lit>type</lit> and <lit>key</lit> 1434 to <class>xist.ns.struts_config.data_source</class>.</li> 1435 1435 </ul> 1436 1436 </section> … … 1439 1439 <section><h>Changes in 1.2.4 (released 11/23/2001)</h> 1440 1440 <ul> 1441 < item>Added the deprecated attributes <lit>start</lit> to1441 <li>Added the deprecated attributes <lit>start</lit> to 1442 1442 <class>xist.ns.html.ol</class> and <lit>value</lit> to 1443 <class>xist.ns.html.li</class>.</ item>1443 <class>xist.ns.html.li</class>.</li> 1444 1444 </ul> 1445 1445 </section> … … 1448 1448 <section><h>Changes in 1.2.3 (released 11/22/2001)</h> 1449 1449 <ul> 1450 < item>Added missing <meth>asPlainString</meth> methods to1451 <class>Comment</class> and <class>DocType</class>.</ item>1450 <li>Added missing <meth>asPlainString</meth> methods to 1451 <class>Comment</class> and <class>DocType</class>.</li> 1452 1452 </ul> 1453 1453 </section> … … 1456 1456 <section><h>Changes in 1.2.2 (released 11/16/2001)</h> 1457 1457 <ul> 1458 < item><meth>xist.url.URL.fileSize</meth> and <meth>xist.url.URL.imageSize</meth>1459 now use the warning framework to report errors.</ item>1460 < item>There is a new presenter named <class>CodePresenter</class> that dumps the1461 tree as Python source code.</ item>1462 < item>The filenames of the pixel images used by <class>xist.ns.specials.pixel</class>1463 have changed. These images are now included.</ item>1458 <li><meth>xist.url.URL.fileSize</meth> and <meth>xist.url.URL.imageSize</meth> 1459 now use the warning framework to report errors.</li> 1460 <li>There is a new presenter named <class>CodePresenter</class> that dumps the 1461 tree as Python source code.</li> 1462 <li>The filenames of the pixel images used by <class>xist.ns.specials.pixel</class> 1463 have changed. These images are now included.</li> 1464 1464 </ul> 1465 1465 </section> … … 1468 1468 <section><h>Changes in 1.2.1 (released 10/08/2001)</h> 1469 1469 <ul> 1470 < item>URLs that are completely dynamic will now be left in peace when parsing1471 or publishing.</ item>1470 <li>URLs that are completely dynamic will now be left in peace when parsing 1471 or publishing.</li> 1472 1472 </ul> 1473 1473 </section> … … 1476 1476 <section><h>Changes in 1.2 (released 10/03/2001)</h> 1477 1477 <ul> 1478 < item><p><class>xist.ns.meta.keywords</class>1478 <li><p><class>xist.ns.meta.keywords</class> 1479 1479 and <class>xist.ns.meta.description</class> 1480 1480 no longer call <meth>asPlainString</meth> … … 1492 1492 </prog> 1493 1493 </example> 1494 </ item>1495 < item>When an element occurs inside an attribute during publishing, there1494 </li> 1495 <li>When an element occurs inside an attribute during publishing, there 1496 1496 won't be an exception raised any more. Instead the content of the element 1497 1497 will be published. This fixes problems with abbreviation entities inside 1498 attributes.</ item>1499 < item><class>xist.parsers.TidyURLInputSource</class> now uses the new1498 attributes.</li> 1499 <li><class>xist.parsers.TidyURLInputSource</class> now uses the new 1500 1500 experimental eGenix mx Extension package, which includes a Python 1501 port of <app>tidy</app>.</ item>1502 < item><meth>__repr__</meth> now uses the new class <class>presenters.PlainPresenter</class>1503 which gives a little more info than the default <meth>__repr__</meth>.</ item>1504 < item>URL handling has been changed again. Upto now, <class>URLAttr</class> had1501 port of <app>tidy</app>.</li> 1502 <li><meth>__repr__</meth> now uses the new class <class>presenters.PlainPresenter</class> 1503 which gives a little more info than the default <meth>__repr__</meth>.</li> 1504 <li>URL handling has been changed again. Upto now, <class>URLAttr</class> had 1505 1505 an additional instance attribute <lit>base</lit>, which was the <z>base</z> file/URL 1506 1506 from which the attribute was parsed. Now the base URL will be directly incorporated … … 1510 1510 and no longer via <meth>__add__</meth>. This makes it more consistent with 1511 1511 <mod>fileutils</mod>. The plan is to make URLs string like immutable objects 1512 and to merge them with <class>fileutils.Filename</class>.</ item>1513 < item><class>xist.ns.specials.php</class> has been moved to its own1512 and to merge them with <class>fileutils.Filename</class>.</li> 1513 <li><class>xist.ns.specials.php</class> has been moved to its own 1514 1514 module (<mod>xist.ns.php</mod>). This module provided additional 1515 1515 convenience processing instructions (just like <mod>xist.ns.jsp</mod> 1516 does).</ item>1516 does).</li> 1517 1517 </ul> 1518 1518 </section> … … 1521 1521 <section><h>Changes in 1.1.3 (released 09/17/2001)</h> 1522 1522 <ul> 1523 < item>The global namespace registry now keeps a sequential list of all registered1523 <li>The global namespace registry now keeps a sequential list of all registered 1524 1524 namespaces, which will be used by the parser when searching for names. This 1525 1525 gives a predictable search order even without using <class>Namespaces</class> 1526 1526 and its <meth>pushNamespace</meth> method: modules imported last will be searched 1527 first.</ item>1528 < item>Processing instructions are now allowed inside attributes when1529 publishing.</ item>1530 < item><mod>xist.ns.docbooklite</mod> has been renamed to <mod>xist.ns.doc</mod>.1527 first.</li> 1528 <li>Processing instructions are now allowed inside attributes when 1529 publishing.</li> 1530 <li><mod>xist.ns.docbooklite</mod> has been renamed to <mod>xist.ns.doc</mod>. 1531 1531 It can now generate &html; and Docbook output and has improved a lot. The &xist; web pages 1532 now use this for automatic documentation generation. The doc example has been removed.</ item>1533 < item><class>xist.url.URL</class> now has a new method <meth>info</meth> that returns the headers1534 for the file/URL.</ item>1535 < item><class>xist.url.URL</class> now has a methods <meth>fileSize</meth> and <meth>imageSize</meth>1536 too.</ item>1537 < item><class>xist.ns.jsp.directive_page</class> now has new attribute <lit>session</lit>.</item>1532 now use this for automatic documentation generation. The doc example has been removed.</li> 1533 <li><class>xist.url.URL</class> now has a new method <meth>info</meth> that returns the headers 1534 for the file/URL.</li> 1535 <li><class>xist.url.URL</class> now has a methods <meth>fileSize</meth> and <meth>imageSize</meth> 1536 too.</li> 1537 <li><class>xist.ns.jsp.directive_page</class> now has new attribute <lit>session</lit>.</li> 1538 1538 </ul> 1539 1539 </section> … … 1542 1542 <section><h>Changes in 1.1.2 (released 08/21/2001)</h> 1543 1543 <ul> 1544 < item><meth>__repr__</meth> now uses the new class <class>presenters.PlainPresenter</class>1545 which gives a little more info than the default <meth>__repr__</meth>.</ item>1544 <li><meth>__repr__</meth> now uses the new class <class>presenters.PlainPresenter</class> 1545 which gives a little more info than the default <meth>__repr__</meth>.</li> 1546 1546 </ul> 1547 1547 </section> … … 1550 1550 <section><h>Changes in 1.1.1 (released 08/01/2001)</h> 1551 1551 <ul> 1552 < item>Small bugfix in <func>presenters.strProcInst</func></item>1553 < item>fixed <class>xist.ns.struts_html.option</class> to allow content</item>1552 <li>Small bugfix in <func>presenters.strProcInst</func></li> 1553 <li>fixed <class>xist.ns.struts_html.option</class> to allow content</li> 1554 1554 </ul> 1555 1555 </section> … … 1558 1558 <section><h>Changes in 1.1 (released 07/19/2001)</h> 1559 1559 <ul> 1560 < item>Sequences in constructor arguments for <class>Frag</class> and1560 <li>Sequences in constructor arguments for <class>Frag</class> and 1561 1561 <class>Element</class> are again expanded and it's again possible 1562 1562 to pass dictionaries in an <class>Element</class> constructor to 1563 1563 specify attributes. As sequences are always unpacked, the method 1564 1564 <meth>extend</meth> is gone. This works for <meth>append</meth> 1565 and <meth>insert</meth> too.</ item>1566 1567 < item><p><class>Node</class> and <class>Frag</class> implement1565 and <meth>insert</meth> too.</li> 1566 1567 <li><p><class>Node</class> and <class>Frag</class> implement 1568 1568 <meth>__mul__</meth> and <meth>__rmul__</meth>, so you can do stuff like:</p> 1569 1569 <prog> 1570 1570 html.br()*5 1571 1571 </prog> 1572 <p>This returns a <class>Frag</class> with five times to same node.</p></ item>1573 1574 < item><p>Arguments for the converter constructor can be passed to1572 <p>This returns a <class>Frag</class> with five times to same node.</p></li> 1573 1574 <li><p>Arguments for the converter constructor can be passed to 1575 1575 <meth>xist.xsc.Node.conv</meth> now, so it's possible to do stuff like this:</p> 1576 1576 <prog> … … 1579 1579 .conv(lang="en").asBytes() 1580 1580 </prog> 1581 <p>which will print <lit>en</lit>.</p></ item>1582 < item>The option <arg>XHTML</arg> for the publishers has been changed1583 to lowercase.</ item>1584 < item><class>xist.ns.html.html</class> will automatically generate a1581 <p>which will print <lit>en</lit>.</p></li> 1582 <li>The option <arg>XHTML</arg> for the publishers has been changed 1583 to lowercase.</li> 1584 <li><class>xist.ns.html.html</class> will automatically generate a 1585 1585 <lit>lang</lit> and <lit>xml:lang</lit> attribute when the 1586 converter has a language set.</ item>1586 converter has a language set.</li> 1587 1587 </ul> 1588 1588 </section> … … 1591 1591 <section><h>Changes in 1.0 (released 06/18/2001)</h> 1592 1592 <ul> 1593 < item>New module for &wml; 1.3.</item>1594 1595 < item>The publishing interface has changed internally1596 and publishing should be faster now.</ item>1597 1598 < item>Publishers now support a new parameter:1593 <li>New module for &wml; 1.3.</li> 1594 1595 <li>The publishing interface has changed internally 1596 and publishing should be faster now.</li> 1597 1598 <li>Publishers now support a new parameter: 1599 1599 <arg>usePrefix</arg>, which specifies if namespace prefixes 1600 should be output for the element names.</ item>1601 1602 < item>Part of the implementation of the publishing1600 should be output for the element names.</li> 1601 1602 <li>Part of the implementation of the publishing 1603 1603 stuff has been moved to C, so now you'll need 1604 a C compiler to install &xist;.</ item>1605 1606 < item>When publishing <lit>"</lit>, it will now only be replaced with1607 <lit>&quot;</lit> inside attributes.</ item>1608 1609 < item>All the <meth>asHTML</meth> methods now have an additional argument1604 a C compiler to install &xist;.</li> 1605 1606 <li>When publishing <lit>"</lit>, it will now only be replaced with 1607 <lit>&quot;</lit> inside attributes.</li> 1608 1609 <li>All the <meth>asHTML</meth> methods now have an additional argument 1610 1610 <arg>converter</arg>. This makes it possible 1611 1611 to implement different processing modes or stages … … 1614 1614 in the call to their childrens' <meth>asHTML</meth> method. 1615 1615 As the name <meth>asHTML</meth> no longer makes sense, <meth>asHTML</meth> 1616 has been renamed to <meth>convert</meth>.</ item>1617 1618 < item>There is now a tool <filename>dtd2xsc.py</filename> in the1616 has been renamed to <meth>convert</meth>.</li> 1617 1618 <li>There is now a tool <filename>dtd2xsc.py</filename> in the 1619 1619 <filename>scripts</filename> directory that creates 1620 1620 a skeleton &xist; module from a &dtd; (this requires <app>xmlproc</app> 1621 from the <app>PyXML</app> package).</ item>1622 1623 < item>New preliminary module for DocBook 4.12.1621 from the <app>PyXML</app> package).</li> 1622 1623 <li>New preliminary module for DocBook 4.12. 1624 1624 (Incomplete: <meth>convert</meth> methods and Unicode character 1625 entities are missing; any volunteers for implementing 375 classes?)</ item>1626 1627 < item>New module <filename>ruby.py</filename> that implements the1625 entities are missing; any volunteers for implementing 375 classes?)</li> 1626 1627 <li>New module <filename>ruby.py</filename> that implements the 1628 1628 <a href="http://www.w3.org/TR/ruby/xhtml11-ruby-1.mod">W3C Ruby draft</a>. 1629 </ item>1630 1631 < item><filename>sql.py</filename> has been removed from &xist;, but is available1632 as a <a href="root:sql/index.html">separate module</a>.</ item>1633 1634 < item>The parsing interface has been changed. Parsing is now done1629 </li> 1630 1631 <li><filename>sql.py</filename> has been removed from &xist;, but is available 1632 as a <a href="root:sql/index.html">separate module</a>.</li> 1633 1634 <li>The parsing interface has been changed. Parsing is now done 1635 1635 with the functions <func>parseFile</func>, <func>parseString</func>, 1636 1636 <func>parseURL</func> and <func>parseTidyURL</func> in the module … … 1639 1639 these functions. &xist; now includes a rudimentary SAX2 driver 1640 1640 for <class>sgmlop</class> and a rudimentary &html; parser that 1641 emits SAX2 events.</ item>1642 1643 < item>The python-quotes example has been updated to work with expat.</item>1644 1645 < item>Added a new example: media.</item>1646 1647 < item>All abbreviation entities have been moved to1648 a new module <filename>abbr.py</filename>.</ item>1649 1650 < item>All the modules that provide new elements and entitites1651 have been moved to a subpackage <mod>ns</mod>.</ item>1652 1653 < item><class>Frag</class> and <class>Element</class>1641 emits SAX2 events.</li> 1642 1643 <li>The python-quotes example has been updated to work with expat.</li> 1644 1645 <li>Added a new example: media.</li> 1646 1647 <li>All abbreviation entities have been moved to 1648 a new module <filename>abbr.py</filename>.</li> 1649 1650 <li>All the modules that provide new elements and entitites 1651 have been moved to a subpackage <mod>ns</mod>.</li> 1652 1653 <li><class>Frag</class> and <class>Element</class> 1654 1654 now have new methods <meth>sorted</meth>, 1655 1655 <meth>reversed</meth>, <meth>filtered</meth> and 1656 1656 <meth>shuffled</meth> that return sorted, reversed, filtered 1657 1657 and shuffled versions of the <class>Frag</class>/<class>Element</class> 1658 object.</ item>1659 1660 < item>New namespace modules <filename>ns/jsp.py</filename> and1658 object.</li> 1659 1660 <li>New namespace modules <filename>ns/jsp.py</filename> and 1661 1661 <filename>ns/struts_html.py</filename> have been added that allow you to 1662 1662 use <a href="http://java.sun.com/products/jsp/">&jsp;</a> and 1663 <a href="http://jakarta.apache.org/struts/">Struts</a> tags with &xist;.</ item>1664 1665 < item>A new method <meth>asText</meth> was added, that returns1663 <a href="http://jakarta.apache.org/struts/">Struts</a> tags with &xist;.</li> 1664 1665 <li>A new method <meth>asText</meth> was added, that returns 1666 1666 the node as a formatted plain &ascii; text (this requires that 1667 1667 <app moreinfo="http://w3m.sf.net/">w3m</app> 1668 is installed.)</ item>1669 1670 < item><filename>make.py</filename> has been renamed to1668 is installed.)</li> 1669 1670 <li><filename>make.py</filename> has been renamed to 1671 1671 <filename>xscmake.py</filename> and moved to the 1672 1672 <dirname>scripts</dirname> directory, 1673 it will be installed as a callable script with <lit>python setup.py install_scripts</lit>.</ item>1674 1675 < item><filename>xscmake.py</filename> has a new option <option>--files</option>/<option>-f</option>.1673 it will be installed as a callable script with <lit>python setup.py install_scripts</lit>.</li> 1674 1675 <li><filename>xscmake.py</filename> has a new option <option>--files</option>/<option>-f</option>. 1676 1676 The argument is a file containing a list of filenames (one 1677 name per line) that should be converted.</ item>1678 1679 < item><filename>xscmake.py</filename> has a new option <option>-r</option>/<option>--parser</option>1677 name per line) that should be converted.</li> 1678 1679 <li><filename>xscmake.py</filename> has a new option <option>-r</option>/<option>--parser</option> 1680 1680 for specifying which parser to use. Allowed values are <lit>sgmlop</lit> 1681 and <lit>expat</lit>.</ item>1682 1683 < item><p><filename>xscmake.py</filename> has a new option <option>-n</option>/<option>--namespace</option>1681 and <lit>expat</lit>.</li> 1682 1683 <li><p><filename>xscmake.py</filename> has a new option <option>-n</option>/<option>--namespace</option> 1684 1684 that can be used for appending <class>Namespace</class> 1685 1685 objects to the <class>Namespaces</class> object used by <filename>xscmake.py</filename>.</p> … … 1692 1692 <p>With this call the parser will find element classes from the 1693 1693 module with the prefix name <lit>spam</lit> before those 1694 from <lit>html</lit> and those before anything else.</p></ item>1695 1696 < item><class>xist.url.URL</class> no longer has an attribute1694 from <lit>html</lit> and those before anything else.</p></li> 1695 1696 <li><class>xist.url.URL</class> no longer has an attribute 1697 1697 <lit>ext</lit>. <lit>file</lit> and <lit>ext</lit> are 1698 merged.</ item>1699 1700 < item>The special treatment of sequences as constructor arguments1698 merged.</li> 1699 1700 <li>The special treatment of sequences as constructor arguments 1701 1701 to <class>Frag</class> and <class>Element</class> 1702 1702 has been removed, so &xist; will no longer remove one level of 1703 nesting. If you still want that, use a <lit>*</lit> argument.</ item>1704 1705 < item><class>Frag</class> and <class>Element</class>1703 nesting. If you still want that, use a <lit>*</lit> argument.</li> 1704 1705 <li><class>Frag</class> and <class>Element</class> 1706 1706 now have a new method <meth>mapped</meth>, 1707 1707 that recursively maps the nodes through a function. This is like 1708 <meth>convert</meth> but via an external function.</ item>1709 1710 < item><p>Attribute handling has been improved thanks to a suggestion1708 <meth>convert</meth> but via an external function.</li> 1709 1710 <li><p>Attribute handling has been improved thanks to a suggestion 1711 1711 by Hartmut Goebel: <meth>Element.__getitem__</meth> now 1712 1712 always works as long as the attribute name is legal. If the attribute … … 1716 1716 publish them. This simplifies several very common cases:</p> 1717 1717 <ul> 1718 < item>Copying an attribute from one element to another works regardless1719 of whether the attribute is set or not;</ item>1720 < item>Testing for an attributes presence can now be done much1718 <li>Copying an attribute from one element to another works regardless 1719 of whether the attribute is set or not;</li> 1720 <li>Testing for an attributes presence can now be done much 1721 1721 simpler: <lit>if element["attrname"]</lit> instead of 1722 1722 <lit>if element.hasAttr("attrname")</lit> (which still 1723 works, and should be a little faster);</ item>1724 < item><p>When you construct a &dom; tree and the presence or absence1723 works, and should be a little faster);</li> 1724 <li><p>When you construct a &dom; tree and the presence or absence 1725 1725 of an attribute is tied to a condition, you can construct the attribute 1726 1726 in advance and use it afterwards in the tree construction:</p> … … 1733 1733 </prog> 1734 1734 <p>So, when the <lit><rep>condition</rep></lit> is false, 1735 the node will not have the attribute <lit>align</lit> set.</p></ item>1736 </ul> 1737 </ item>1738 < item><p><class>xist.ns.cond.If</class> (and <class>xist.ns.cond.ElIf</class>)1735 the node will not have the attribute <lit>align</lit> set.</p></li> 1736 </ul> 1737 </li> 1738 <li><p><class>xist.ns.cond.If</class> (and <class>xist.ns.cond.ElIf</class>) 1739 1739 can now be used to test for attributes of the converter. I.e. it's possible to 1740 1740 write the following &xml;:</p> … … 1744 1744 </if> 1745 1745 </prog> 1746 </ item>1747 < item>URL handling has be completely changed and is much, much simpler now.1746 </li> 1747 <li>URL handling has be completely changed and is much, much simpler now. 1748 1748 There are no more path markers. To specify an URL that is relative to the 1749 current directory use the scheme <lit>root</lit> (e.g. <lit>root:main.css</lit>).</ item>1749 current directory use the scheme <lit>root</lit> (e.g. <lit>root:main.css</lit>).</li> 1750 1750 </ul> 1751 1751 </section> … … 1754 1754 <section><h>Changes in 0.4.7 (released 11/24/2000)</h> 1755 1755 <ul> 1756 < item>Fixed a bug in the entity handling.</item>1757 1758 < item>Added a few deprecated elements and attributes to1759 the <mod>html</mod> module.</ item>1760 1761 < item>Improved the publishing of attributes. Now all attribute1756 <li>Fixed a bug in the entity handling.</li> 1757 1758 <li>Added a few deprecated elements and attributes to 1759 the <mod>html</mod> module.</li> 1760 1761 <li>Improved the publishing of attributes. Now all attribute 1762 1762 values will be published. For boolean attributes no value 1763 1763 will be published for <lit>XHTML==0</lit> and the attribute 1764 name will be used for <lit>XHTML==1</lit> or <lit>XHTML==2</lit>.</ item>1765 1766 < item><meth>Element.compact</meth> now works (better) ;).</item>1767 1768 < item>Incorparated many bug fixes from Hartmut Goebel.</item>1769 1770 < item>Implemented <meth>xsc.Element.copyDefaultAttrs</meth>, which copies1764 name will be used for <lit>XHTML==1</lit> or <lit>XHTML==2</lit>.</li> 1765 1766 <li><meth>Element.compact</meth> now works (better) ;).</li> 1767 1768 <li>Incorparated many bug fixes from Hartmut Goebel.</li> 1769 1770 <li>Implemented <meth>xsc.Element.copyDefaultAttrs</meth>, which copies 1771 1771 unset attributes over from a dictionary (simplifies 1772 implementing <class>specials.plaintable</class> and <class>specials.plainbody</class>)</ item>1773 1774 < item><meth>providers.Provider.pushNamespace</meth> now handles multiple1772 implementing <class>specials.plaintable</class> and <class>specials.plainbody</class>)</li> 1773 1774 <li><meth>providers.Provider.pushNamespace</meth> now handles multiple 1775 1775 arguments which may be <class>Namespace</class> objects or modules 1776 (in which case, <lit><rep>module</rep>.namespace</lit> will be pushed)</ item>1777 1778 < item><meth>providers.Providers.popNamespace</meth> can now pop multiple1779 namespaces at once.</ item>1780 1781 < item><class>providers.TidyURIProvider</class> now uses <func>os.popen3</func> for1776 (in which case, <lit><rep>module</rep>.namespace</lit> will be pushed)</li> 1777 1778 <li><meth>providers.Providers.popNamespace</meth> can now pop multiple 1779 namespaces at once.</li> 1780 1781 <li><class>providers.TidyURIProvider</class> now uses <func>os.popen3</func> for 1782 1782 piping the file through tidy, so now there will be 1783 1783 no more temporary files. The call to tidy now includes 1784 1784 options that hopefully make the output more suited to 1785 &xist;.</ item>1786 1787 < item>Incorparated a new <filename>url.py</filename> by Hartmut Goebel, that fixes1785 &xist;.</li> 1786 1787 <li>Incorparated a new <filename>url.py</filename> by Hartmut Goebel, that fixes 1788 1788 many problem (e.g. optimizing <lit>http://server/foo/bar/../../baz.gif</lit> 1789 now works.)</ item>1790 1791 < item><filename>make.py</filename> includes a new option <option>--path</option> for1792 adding directories to <lit>sys.path</lit>.</ item>1789 now works.)</li> 1790 1791 <li><filename>make.py</filename> includes a new option <option>--path</option> for 1792 adding directories to <lit>sys.path</lit>.</li> 1793 1793 </ul> 1794 1794 </section> … … 1797 1797 <section><h>Changes in 0.4.6 (released 11/03/2000)</h> 1798 1798 <ul> 1799 < item>Now uses <class>sgmlop.XMLParser</class> instead of1800 <class>sgmlop.SGMLParser</class>, so case is preserved.</ item>1801 1802 < item>Fixed another regression from the URL to string conversion1803 change.</ item>1799 <li>Now uses <class>sgmlop.XMLParser</class> instead of 1800 <class>sgmlop.SGMLParser</class>, so case is preserved.</li> 1801 1802 <li>Fixed another regression from the URL to string conversion 1803 change.</li> 1804 1804 </ul> 1805 1805 </section> … … 1808 1808 <section><h>Changes in 0.4.5 (released 11/01/2000)</h> 1809 1809 <ul> 1810 < item>Converting URLs to nodes is now done in <func>ToNode</func>,1811 so <class>URL</class> objects can be used everywhere.</ item>1812 1813 < item>Fixed a few bugs in <meth>Text._strtext</meth> and1814 <meth>URLAttr._str</meth>.</ item>1810 <li>Converting URLs to nodes is now done in <func>ToNode</func>, 1811 so <class>URL</class> objects can be used everywhere.</li> 1812 1813 <li>Fixed a few bugs in <meth>Text._strtext</meth> and 1814 <meth>URLAttr._str</meth>.</li> 1815 1815 </ul> 1816 1816 </section> … … 1819 1819 <section><h>Changes in 0.4.4 (releases 10/27/2000)</h> 1820 1820 <ul> 1821 < item>Now testing if characters can be encoded with the1821 <li>Now testing if characters can be encoded with the 1822 1822 specified encoding is done directy. This means, that 1823 1823 escaping unencodable characters now works even with 1824 1824 exotic encodings (tested with 1825 <a href="http://pseudo.grad.sccs.chukyo-u.ac.jp/~kajiyama/python/"><filename>JapaneseCodecs-1.0.1.tar.gz</filename></a>).</ item>1826 1827 < item>The <class>URLAttr</class> constructor now can handle a single parameter1828 of the type <class>URL</class>.</ item>1829 1830 < item>The URL to string conversion function have changed:1825 <a href="http://pseudo.grad.sccs.chukyo-u.ac.jp/~kajiyama/python/"><filename>JapaneseCodecs-1.0.1.tar.gz</filename></a>).</li> 1826 1827 <li>The <class>URLAttr</class> constructor now can handle a single parameter 1828 of the type <class>URL</class>.</li> 1829 1830 <li>The URL to string conversion function have changed: 1831 1831 <meth>URL.asString</meth> returns the URL with path markers, 1832 <meth>URL.asPlainString</meth> returns the URL without path markers.</ item>1833 1834 < item>Added the <lit>i18n</lit> attribute to the <class>font</class> element.</item>1835 1836 < item>Fixed the clashes between the class names for the elements1837 and entities <class>sub</class> and <class>sup</class> in <filename>html.py</filename>.</ item>1838 1839 < item>Several small enhancements and bug fixes contributed by1840 Hartmut Goebel.</ item>1832 <meth>URL.asPlainString</meth> returns the URL without path markers.</li> 1833 1834 <li>Added the <lit>i18n</lit> attribute to the <class>font</class> element.</li> 1835 1836 <li>Fixed the clashes between the class names for the elements 1837 and entities <class>sub</class> and <class>sup</class> in <filename>html.py</filename>.</li> 1838 1839 <li>Several small enhancements and bug fixes contributed by 1840 Hartmut Goebel.</li> 1841 1841 </ul> 1842 1842 </section> … … 1845 1845 <section><h>Changes in 0.4.3 (released 10/19/2000)</h> 1846 1846 <ul> 1847 < item>Now processing instruction classes are registered in the1848 same way as elements and entities are.</ item>1849 1850 < item>The leaf nodes (<class>Text</class>, <class>Comment</class>,1847 <li>Now processing instruction classes are registered in the 1848 same way as elements and entities are.</li> 1849 1850 <li>The leaf nodes (<class>Text</class>, <class>Comment</class>, 1851 1851 <class>ProcInst</class>) are now considered immutable. 1852 1852 This means that their <meth>asHTML</meth> method can … … 1854 1854 trees. Functionality for manipulation the objects is provided by a mixin 1855 1855 class very similar to <class>UserString</class>. All this results 1856 in a speedup of about 10% for the python-quotes example.</ item>1857 1858 < item>Small optimizations in the <meth>asHTML</meth> methods of <class>Element</class> and1856 in a speedup of about 10% for the python-quotes example.</li> 1857 1858 <li>Small optimizations in the <meth>asHTML</meth> methods of <class>Element</class> and 1859 1859 <class>Frag</class> optimized away many calls to <meth>append</meth>, 1860 1860 <meth>extend</meth> and <meth>ToNode</meth> and result in a speedup 1861 1861 of about 30% for the python-quotes example. One consequence of this is 1862 that <class>Null</class> objects will no longer be ignored.</ item>1862 that <class>Null</class> objects will no longer be ignored.</li> 1863 1863 </ul> 1864 1864 </section> … … 1867 1867 <section><h>Changes in 0.4.2 (released 09/24/2000)</h> 1868 1868 <ul> 1869 < item>New elements <class>keywords</class> and <class>description</class> in1870 <filename>meta.py</filename>.</ item>1871 1872 < item>Fixed a bug in <meth>Namespace.register</meth>, now setting <lit>name=None</lit>1873 to prevent an element from being registered works again.</ item>1869 <li>New elements <class>keywords</class> and <class>description</class> in 1870 <filename>meta.py</filename>.</li> 1871 1872 <li>Fixed a bug in <meth>Namespace.register</meth>, now setting <lit>name=None</lit> 1873 to prevent an element from being registered works again.</li> 1874 1874 </ul> 1875 1875 </section> … … 1878 1878 <section><h>Changes in 0.4.1 (released 09/21/2000)</h> 1879 1879 <ul> 1880 < item>A new module named <filename>meta.py</filename> has been created, that simplifies1881 generating meta tags.</ item>1882 1883 < item>Various small bugfixes.</item>1880 <li>A new module named <filename>meta.py</filename> has been created, that simplifies 1881 generating meta tags.</li> 1882 1883 <li>Various small bugfixes.</li> 1884 1884 </ul> 1885 1885 </section> … … 1888 1888 <section><h>Changes in 0.4 (released 09/19/2000)</h> 1889 1889 <ul> 1890 < item>&xist; now requires at least Python 2.0b1.</item>1891 1892 < item>A new bugfixed version of the <app>sgmlop</app> source is available1893 from the <a href="ftp://ftp.livinglogic.de/pub/livinglogic/xist/">&ftp; site</a>.</ item>1894 1895 < item>&xist; now completely supports Unicode. For output any1890 <li>&xist; now requires at least Python 2.0b1.</li> 1891 1892 <li>A new bugfixed version of the <app>sgmlop</app> source is available 1893 from the <a href="ftp://ftp.livinglogic.de/pub/livinglogic/xist/">&ftp; site</a>.</li> 1894 1895 <li>&xist; now completely supports Unicode. For output any 1896 1896 encoding known to Python can be used, so now you 1897 can output your &html; in ASCII, Latin-1, UTF-8, UTF-16, ...</ item>1898 1899 < item>All publishers have been updated to support Unicode.1897 can output your &html; in ASCII, Latin-1, UTF-8, UTF-16, ...</li> 1898 1899 <li>All publishers have been updated to support Unicode. 1900 1900 The publishing interface has been streamlined (<arg>encoding</arg> 1901 and <arg>XHTML</arg> parameters are now attributes of the publisher).</ item>1902 1903 < item><meth>asString</meth> will now always return a Unicode string. If you1901 and <arg>XHTML</arg> parameters are now attributes of the publisher).</li> 1902 1903 <li><meth>asString</meth> will now always return a Unicode string. If you 1904 1904 want a byte string use <meth>asBytes</meth> instead, where the encoding 1905 can be specified as an argument.</ item>1906 1907 < item>There an additional publisher class <class>FilePublisher</class>, which can1905 can be specified as an argument.</li> 1906 1907 <li>There an additional publisher class <class>FilePublisher</class>, which can 1908 1908 be used for publishing to a file (or anything else that has 1909 1909 a <meth>write</meth> and a <meth>writelines</meth> method, and is supported by the stream 1910 writer available through <func>codecs.lookup</func>).</ item>1911 1912 < item>Element and attribute names are no longer converted to lowercase.1910 writer available through <func>codecs.lookup</func>).</li> 1911 1912 <li>Element and attribute names are no longer converted to lowercase. 1913 1913 If you have an attribute name which clashes with a Python 1914 1914 keyword (e.g. <lit>class</lit>) append an underscore (<lit>_</lit>), 1915 1915 which will be removed before accessing the attribute. This is the <z>official</z> 1916 Python method for handling these cases.</ item>1917 1918 < item>Elements and entities are no longer registered one by one. Now1916 Python method for handling these cases.</li> 1917 1918 <li>Elements and entities are no longer registered one by one. Now 1919 1919 you can build <class>Namespace</class> objects which are used for searching 1920 1920 and there are <meth>pushNamespace</meth> and <meth>popNamespace</meth> 1921 functions in <mod>XSC.xsc</mod>. For more info, see the source.</ item>1922 1923 < item>Image size calculation has been removed from <class>html.img</class> and1921 functions in <mod>XSC.xsc</mod>. For more info, see the source.</li> 1922 1923 <li>Image size calculation has been removed from <class>html.img</class> and 1924 1924 <class>html.input</class>. Use <class>specials.autoimg</class> and 1925 <class>specials.autoinput</class> for that.</ item>1926 1927 < item><meth>__getitem__</meth>, <meth>__setitem__</meth> and <meth>__delitem</meth>1925 <class>specials.autoinput</class> for that.</li> 1926 1927 <li><meth>__getitem__</meth>, <meth>__setitem__</meth> and <meth>__delitem</meth> 1928 1928 of <class>Frag</class> and <class>Element</class> now accepts a list as an argument. 1929 1929 The method will be applied recursively, i.e. <lit>e[[0, 1, "foo", 2]</lit> is the 1930 same as <lit>e[0][1]["foo"][2]</lit>.</ item>1931 1932 < item>The deprecated module <filename>db.py</filename> no longer exists. Useful functions and elements1930 same as <lit>e[0][1]["foo"][2]</lit>.</li> 1931 1932 <li>The deprecated module <filename>db.py</filename> no longer exists. Useful functions and elements 1933 1933 from <filename>db.py</filename> have been moved to <filename>sql.py</filename> and 1934 <filename>form.py</filename> respectively.</ item>1935 1936 < item>When using <func>xsc.make</func> the encoding and XHTML parameters to use can now1937 be specified on the command line (e.g. <lit>--encoding utf-8 --xhtml 2</lit>)</ item>1938 1939 < item><p>Handling of multiline <markup><?xsc-eval?></markup> and <markup><?xsc-exec?></markup>1934 <filename>form.py</filename> respectively.</li> 1935 1936 <li>When using <func>xsc.make</func> the encoding and XHTML parameters to use can now 1937 be specified on the command line (e.g. <lit>--encoding utf-8 --xhtml 2</lit>)</li> 1938 1939 <li><p>Handling of multiline <markup><?xsc-eval?></markup> and <markup><?xsc-exec?></markup> 1940 1940 has been enhanced, although, &xist; will not be able to guess the correct indentation 1941 1941 in all cases. As a workarround simply add a Python comment to the beginning:</p> … … 1955 1955 </prog> 1956 1956 <p>will.</p> 1957 </ item>1958 1959 < item><p>Make functionality has been moved to <filename>make.py</filename>, as certain modules can't1957 </li> 1958 1959 <li><p>Make functionality has been moved to <filename>make.py</filename>, as certain modules can't 1960 1960 be used as the main script, because reimporting them in processing 1961 1961 instructions won't work. Now you can simply call</p> … … 1964 1964 <prog>make.py --import xist.html --import spam eggs.xsc</prog> 1965 1965 </example> 1966 </ item>1967 1968 < item><p>There is a new module <filename>cond.py</filename>, that contains1966 </li> 1967 1968 <li><p>There is a new module <filename>cond.py</filename>, that contains 1969 1969 elements that can be used for conditionals:</p> 1970 1970 <prog> … … 1978 1978 </if> 1979 1979 </prog> 1980 </ item>1980 </li> 1981 1981 </ul> 1982 1982 </section> … … 1985 1985 <section><h>Changes in 0.3.9 (released 08/10/2000)</h> 1986 1986 <ul> 1987 < item><app>sgmlop</app> will now be found either via <lit>import sgmlop</lit>1988 or via <lit>from xml.parsers import sgmlop</lit>.</ item>1987 <li><app>sgmlop</app> will now be found either via <lit>import sgmlop</lit> 1988 or via <lit>from xml.parsers import sgmlop</lit>.</li> 1989 1989 </ul> 1990 1990 </section> … … 1993 1993 <section><h>Changes in 0.3.8 (released 07/14/2000)</h> 1994 1994 <ul> 1995 < item>Fixed a bug in <meth>URLAttr.publish</meth>, which prevented1996 <class>URLAttr</class> from working at all.</ item>1995 <li>Fixed a bug in <meth>URLAttr.publish</meth>, which prevented 1996 <class>URLAttr</class> from working at all.</li> 1997 1997 </ul> 1998 1998 </section> … … 2001 2001 <section><h>Changes in 0.3.7 (released 07/06/2000)</h> 2002 2002 <ul> 2003 < item>Fixed a bug in <class>html.img</class> and <class>html.input</class>.2004 Now image size calculation works again.</ item>2003 <li>Fixed a bug in <class>html.img</class> and <class>html.input</class>. 2004 Now image size calculation works again.</li> 2005 2005 </ul> 2006 2006 </section> … … 2009 2009 <section><h>Changes in 0.3.6 (released 07/04/2000)</h> 2010 2010 <ul> 2011 < item>Fixed a bug in <meth>Node._matches</meth>, which resulted in a non working2012 <meth>find</meth>.</ item>2011 <li>Fixed a bug in <meth>Node._matches</meth>, which resulted in a non working 2012 <meth>find</meth>.</li> 2013 2013 </ul> 2014 2014 </section> … … 2017 2017 <section><h>Changes in 0.3.5 (released 07/02/2000)</h> 2018 2018 <ul> 2019 < item>The documentation example has been enhanced. Now documenting methods works.</item>2020 2021 < item>When the member <lit>elementname</lit> in the element class is set before calling2019 <li>The documentation example has been enhanced. Now documenting methods works.</li> 2020 2021 <li>When the member <lit>elementname</lit> in the element class is set before calling 2022 2022 <func>registerElement</func>, this element name will be used for the element. This 2023 allows custom names even when using <func>registerAllElements</func>.</ item>2024 2025 < item>Comparison of scheme and server in URLs is done case insensitive2023 allows custom names even when using <func>registerAllElements</func>.</li> 2024 2025 <li>Comparison of scheme and server in URLs is done case insensitive 2026 2026 (as <a href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</a> 2027 requires.)</ item>2028 2029 < item><p>Image size calculation is now done in <meth>asString</meth> and2027 requires.)</li> 2028 2029 <li><p>Image size calculation is now done in <meth>asString</meth> and 2030 2030 not in <meth>asHTML</meth>. 2031 2031 This allows to write faster code. Old method:</p> 2032 2032 <prog>e = html.div(html.img(...),gurk.hurz()).asHTML().asString()</prog> 2033 2033 <p>New method</p> 2034 <prog>e = html.div(html.img(...),gurk.hurz().asHTML()).asString()</prog></ item>2035 2036 < item>Image size calculation is now done for <markup><input type="image"></markup>.2037 The <lit>size</lit> attribute is set to the image width.</ item>2038 2039 < item><p>Manipulating the path in an &url; is now done via the usual2034 <prog>e = html.div(html.img(...),gurk.hurz().asHTML()).asString()</prog></li> 2035 2036 <li>Image size calculation is now done for <markup><input type="image"></markup>. 2037 The <lit>size</lit> attribute is set to the image width.</li> 2038 2039 <li><p>Manipulating the path in an &url; is now done via the usual 2040 2040 <meth>__setitem__</meth>/<meth>__getitem__</meth> stuff, 2041 2041 which keeps the path in a consistent state.</p> … … 2047 2047 URL(scheme='server', path=['bar'], file='baz', ext='gif') 2048 2048 </prog> 2049 </ item>2050 2051 < item><meth>findNodes</meth> (which has been shortened to <meth>find</meth>)2049 </li> 2050 2051 <li><meth>findNodes</meth> (which has been shortened to <meth>find</meth>) 2052 2052 has an additional argument <arg>test</arg>, which can be a test function that will 2053 be called when the node passes all other tests.</ item>2054 2055 < item><meth>asString</meth> no longer generates a string directly, but uses the new method2053 be called when the node passes all other tests.</li> 2054 2055 <li><meth>asString</meth> no longer generates a string directly, but uses the new method 2056 2056 <meth>publish</meth>, which has an additional argument <arg>publisher</arg>, 2057 to which the strings to be output are passed.</ item>2057 to which the strings to be output are passed.</li> 2058 2058 </ul> 2059 2059 </section> … … 2062 2062 <section><h>Changes in 0.3.4 (released 05/31/2000)</h> 2063 2063 <ul> 2064 < item>Location information is now copied over in <meth>clone</meth>, <meth>asHTML</meth>2064 <li>Location information is now copied over in <meth>clone</meth>, <meth>asHTML</meth> 2065 2065 and <meth>compact</meth> where appropriate, so you know even in the &html; tree 2066 where something came from.</ item>2067 2068 < item><p><lit>xsc.repransi</lit> can now have three values:</p>2069 <ul> 2070 < item><lit>0</lit>: coloring is off</item>2071 < item><lit>1</lit>: coloring is on for a dark background</item>2072 < item><lit>2</lit>: coloring is on for a light background</item>2066 where something came from.</li> 2067 2068 <li><p><lit>xsc.repransi</lit> can now have three values:</p> 2069 <ul> 2070 <li><lit>0</lit>: coloring is off</li> 2071 <li><lit>1</lit>: coloring is on for a dark background</li> 2072 <li><lit>2</lit>: coloring is on for a light background</li> 2073 2073 </ul> 2074 2074 <p>All <lit>repransi</lit> variables are now arrays with two strings, 2075 the first for dark, the second for light.</p></ item>2075 the first for dark, the second for light.</p></li> 2076 2076 </ul> 2077 2077 </section> … … 2080 2080 <section><h>Changes in 0.3.3 (released 05/30/2000)</h> 2081 2081 <ul> 2082 < item>The workaround for the trailing CDATA bug in <app>sgmlop</app> has been removed, so now2083 you'll need a newer version of <app>sgmlop</app> (included in <app>PyXML 0.5.5.1</app>)</ item>2082 <li>The workaround for the trailing CDATA bug in <app>sgmlop</app> has been removed, so now 2083 you'll need a newer version of <app>sgmlop</app> (included in <app>PyXML 0.5.5.1</app>)</li> 2084 2084 </ul> 2085 2085 </section> … … 2088 2088 <section><h>Changes before 0.3.3</h> 2089 2089 <ul> 2090 < item>These changes predate written history.</item>2091 </ul> 2092 </section> 2090 <li>These changes predate written history.</li> 2091 </ul> 2092 </section> -
docs/Advanced.xml
r3128 r3131 36 36 37 37 38 <section><h>Chaining pool and extending namespaces</h>38 <section><h>Chaining pools and extending namespaces</h> 39 39 40 40 <p>When using <pyref module="ll.xist.xsc" class="Pool">pools</pyref> it's -
docs/Howto.xml
r3128 r3131 19 19 final &html; or &xml; output requires the following three steps:</p> 20 20 <ul> 21 <item>Generating a source &xml; tree: This can be done either by 22 parsing an &xml; file, or by directly constructing the 23 tree — as <app>HTMLgen</app> and <app>HyperText</app> 24 do — as a tree of Python objects. &xist; provides a very natural 25 and pythonic &api; for that.</item> 26 <item>Converting the source tree into a target tree: This target 27 tree can be a &html; tree or a &svg; tree or XSL-FO tree or any other 28 &xml; tree you like. Every node class provides a 29 <meth>convert</meth> method for performing this conversion. For 30 your own &xml; element types you have to define your 31 own element classes and implement an appropriate 32 <meth>convert</meth> method. This is possible for 33 processing instructions and entity references too.</item> 34 <item>Publishing the target tree: For generating the final 35 output a <class>Publisher</class> object is used that generates 36 the encoded byte string fragments that can be written to an output stream 37 (or yielded from a WSGI application, etc.).</item> 38 </ul> 21 <li>Generating a source &xml; tree: This can be done either by parsing an &xml; 22 file, or by directly constructing the tree — as <app>HTMLgen</app> and 23 <app>HyperText</app> do — as a tree of Python objects. &xist; provides a 24 very natural and pythonic &api; for that.</li> 25 <li>Converting the source tree into a target tree: This target tree can be a 26 &html; tree or a &svg; tree or XSL-FO tree or any other &xml; tree you like. 27 Every node class provides a <meth>convert</meth> method for performing this 28 conversion. For your own &xml; element types you have to define your own element 29 classes and implement an appropriate <meth>convert</meth> method. This is 30 possible for processing instructions and entity references too.</li> 31 <li>Publishing the target tree: For generating the final output a 32 <class>Publisher</class> object is used that generates the encoded byte string 33 fragments that can be written to an output stream (or yielded from a WSGI 34 application, etc.).</li></ul> 39 35 </section> 40 36 … … 43 39 <p>Like any other &xml; tree &api;, &xist; provides the usual classes:</p> 44 40 <ul> 45 < item><pyref module="ll.xist.xsc" class="Element"><class>Element</class></pyref> for &xml; elements;</item>46 < item><pyref module="ll.xist.xsc" class="Attr"><class>Attr</class></pyref> for attributes;</item>47 < item><pyref module="ll.xist.xsc" class="Attrs"><class>Attrs</class></pyref> for attribute mappings;</item>48 < item><pyref module="ll.xist.xsc" class="Text"><class>Text</class></pyref> for text data;</item>49 < item><pyref module="ll.xist.xsc" class="Frag"><class>Frag</class></pyref> for document fragments,50 (a <class>Frag</class> object is simply a list of nodes);</ item>51 < item><pyref module="ll.xist.xsc" class="Comment"><class>Comment</class></pyref> for &xml; comments52 (e.g. <markup><!-- the comment --></markup>);</ item>53 < item><pyref module="ll.xist.xsc" class="ProcInst"><class>ProcInst</class></pyref> for processing instructions54 (e.g. <markup><?php echo $spam;?></markup>);</ item>55 < item><pyref module="ll.xist.xsc" class="Entity"><class>Entity</class></pyref> for entity references56 (e.g. <markup>&parrot;</markup>) and</ item>57 < item><pyref module="ll.xist.xsc" class="DocType"><class>DocType</class></pyref> for document type58 declarations (e.g. <markup><!DOCTYPE html PUBLIC <rep>...</rep>></markup>).</ item>41 <li><pyref module="ll.xist.xsc" class="Element"><class>Element</class></pyref> for &xml; elements;</li> 42 <li><pyref module="ll.xist.xsc" class="Attr"><class>Attr</class></pyref> for attributes;</li> 43 <li><pyref module="ll.xist.xsc" class="Attrs"><class>Attrs</class></pyref> for attribute mappings;</li> 44 <li><pyref module="ll.xist.xsc" class="Text"><class>Text</class></pyref> for text data;</li> 45 <li><pyref module="ll.xist.xsc" class="Frag"><class>Frag</class></pyref> for document fragments, 46 (a <class>Frag</class> object is simply a list of nodes);</li> 47 <li><pyref module="ll.xist.xsc" class="Comment"><class>Comment</class></pyref> for &xml; comments 48 (e.g. <markup><!-- the comment --></markup>);</li> 49 <li><pyref module="ll.xist.xsc" class="ProcInst"><class>ProcInst</class></pyref> for processing instructions 50 (e.g. <markup><?php echo $spam;?></markup>);</li> 51 <li><pyref module="ll.xist.xsc" class="Entity"><class>Entity</class></pyref> for entity references 52 (e.g. <markup>&parrot;</markup>) and</li> 53 <li><pyref module="ll.xist.xsc" class="DocType"><class>DocType</class></pyref> for document type 54 declarations (e.g. <markup><!DOCTYPE html PUBLIC <rep>...</rep>></markup>).</li> 59 55 </ul> 60 56 … … 140 136 provides several functions:</p> 141 137 <dl> 142 < term><lit>parsestring(data, base=None, encoding=None, **builderargs)</lit></term>143 < item>Parse the string <arg>data</arg> into an &xist; tree.</item>144 < term><lit>parseiter(iterable, base=None, encoding=None, **builderargs)</lit></term>145 < item>Parse the input from the iterable <arg>iterable</arg> (which must produce the146 input in chunks of bytes) into an &xist; tree.</ item>147 < term><lit>parsestream(stream, base=None, encoding=None, bufsize=8192, **builderargs)</lit></term>148 < item>Parse &xml; from the stream <arg>stream</arg> into an &xist; tree.</item>149 < term><lit>parsefile(filename, base=None, encoding=None, bufsize=8192, **builderargs)</lit></term>150 < item>Parse &xml; input from the file named <arg>filename</arg>.</item>151 < term><lit>parseurl(name, base=None, encoding=None, bufsize=8192, headers=None, data=None, **builderargs)</lit></term>152 < item>Parse &xml; input from the &url; <arg>name</arg> into an &xist; tree.</item>153 < term><lit>parseetree(tree, base=None, **builderargs)</lit></term>154 < item>Parse &xml; input from the object <arg>tree</arg> which must support the155 <a href="http://effbot.org/zone/element-index.htm">ElementTree</a> &api;.</ item>138 <dt><lit>parsestring(data, base=None, encoding=None, **builderargs)</lit></dt> 139 <dd>Parse the string <arg>data</arg> into an &xist; tree.</dd> 140 <dt><lit>parseiter(iterable, base=None, encoding=None, **builderargs)</lit></dt> 141 <dd>Parse the input from the iterable <arg>iterable</arg> (which must produce the 142 input in chunks of bytes) into an &xist; tree.</dd> 143 <dt><lit>parsestream(stream, base=None, encoding=None, bufsize=8192, **builderargs)</lit></dt> 144 <dd>Parse &xml; from the stream <arg>stream</arg> into an &xist; tree.</dd> 145 <dt><lit>parsefile(filename, base=None, encoding=None, bufsize=8192, **builderargs)</lit></dt> 146 <dd>Parse &xml; input from the file named <arg>filename</arg>.</dd> 147 <dt><lit>parseurl(name, base=None, encoding=None, bufsize=8192, headers=None, data=None, **builderargs)</lit></dt> 148 <dd>Parse &xml; input from the &url; <arg>name</arg> into an &xist; tree.</dd> 149 <dt><lit>parseetree(tree, base=None, **builderargs)</lit></dt> 150 <dd>Parse &xml; input from the object <arg>tree</arg> which must support the 151 <a href="http://effbot.org/zone/element-index.htm">ElementTree</a> &api;.</dd> 156 152 </dl> 157 153 <p>For example, parsing a string can be done like this:</p> … … 276 272 <pyref module="ll.xist.converters" class="Converter"><class>Converter</class></pyref> constructor:</p> 277 273 <dl> 278 < term><arg>root</arg></term><item><arg>root</arg> (which defaults to <lit>None</lit>) is the root &url;274 <dt><arg>root</arg></dt><dd><arg>root</arg> (which defaults to <lit>None</lit>) is the root &url; 279 275 for the conversion process. When you want to resolve a link in some of your own <meth>convert</meth> methods, 280 276 the &url; must be interpreted relative to this root &url; (You can use 281 277 <pyref module="ll.xist.xsc" class="URLAttr" method="forInput"><meth>URLAttr.forInput</meth></pyref> 282 for that).</ item>283 < term><arg>mode</arg></term><item><arg>mode</arg> (which defaults to <lit>None</lit>) works the same way284 as modes in &xslt;. You can use this for implementing different conversion modes.</ item>285 < term><arg>stage</arg></term><item><arg>stage</arg> (which defaults to <lit>"deliver"</lit>)278 for that).</dd> 279 <dt><arg>mode</arg></dt><dd><arg>mode</arg> (which defaults to <lit>None</lit>) works the same way 280 as modes in &xslt;. You can use this for implementing different conversion modes.</dd> 281 <dt><arg>stage</arg></dt><dd><arg>stage</arg> (which defaults to <lit>"deliver"</lit>) 286 282 allows you to implement multi stage conversion: Suppose that you want to deliver a dynamically 287 283 constructed web page with &xist; that contains results from a database query and the current time. … … 293 289 would do the conversion when <lit><arg>stage</arg>=="deliver"</lit> and simply returns itself 294 290 when <lit><arg>stage</arg>=="cache"</lit>, so it would still be part of the cached &xml; tree 295 and would be converted to &html; on every request.</ item>296 < term><arg>target</arg></term><item><arg>target</arg> (which defaults to291 and would be converted to &html; on every request.</dd> 292 <dt><arg>target</arg></dt><dd><arg>target</arg> (which defaults to 297 293 <pyref module="ll.xist.ns.html"><mod>ll.xist.ns.html</mod></pyref>) specifies what the output should be. 298 294 Values must be <pyref module="ll.xist.xsc" class="Namespace">namespace subclasses</pyref> 299 (see below for an explanation of namespaces).</ item>300 < term><arg>lang</arg></term><item><p><arg>lang</arg> (which defaults to <lit>None</lit>) is the language295 (see below for an explanation of namespaces).</dd> 296 <dt><arg>lang</arg></dt><dd><p><arg>lang</arg> (which defaults to <lit>None</lit>) is the language 301 297 in which the result tree should be. This can be used in the <meth>convert</meth> method 302 298 to implement different conversions for different languages, e.g.:</p> … … 316 312 return node.convert(converter) 317 313 </prog> 318 </ item>314 </dd> 319 315 </dl> 320 316 … … 347 343 348 344 <ul> 349 < item><pyref module="ll.xist.xsc" class="TextAttr"><class>TextAttr</class></pyref>, for normal text attributes;</item>350 < item><pyref module="ll.xist.xsc" class="URLAttr"><class>URLAttr</class></pyref>, for attributes that are &url;s;</item>351 < item><pyref module="ll.xist.xsc" class="BoolAttr"><class>BoolAttr</class></pyref>, for boolean attributes (for such an attribute352 only its presence is important, it's value will always be the same as the attribute name when publishing);</ item>353 < item><pyref module="ll.xist.xsc" class="IntAttr"><class>IntAttr</class></pyref>, for integer attributes;</item>354 < item><pyref module="ll.xist.xsc" class="ColorAttr"><class>ColorAttr</class></pyref>, for color attributes (e.g. <lit>#ffffff</lit>).</item>345 <li><pyref module="ll.xist.xsc" class="TextAttr"><class>TextAttr</class></pyref>, for normal text attributes;</li> 346 <li><pyref module="ll.xist.xsc" class="URLAttr"><class>URLAttr</class></pyref>, for attributes that are &url;s;</li> 347 <li><pyref module="ll.xist.xsc" class="BoolAttr"><class>BoolAttr</class></pyref>, for boolean attributes (for such an attribute 348 only its presence is important, it's value will always be the same as the attribute name when publishing);</li> 349 <li><pyref module="ll.xist.xsc" class="IntAttr"><class>IntAttr</class></pyref>, for integer attributes;</li> 350 <li><pyref module="ll.xist.xsc" class="ColorAttr"><class>ColorAttr</class></pyref>, for color attributes (e.g. <lit>#ffffff</lit>).</li> 355 351 </ul> 356 352 … … 832 828 833 829 <dl> 834 < term><lit>xhtml==0</lit></term><item>This will give you pure &html;, i.e. no830 <dt><lit>xhtml==0</lit></dt><dd>This will give you pure &html;, i.e. no 835 831 final <lit>/</lit> for elements with an empty content model, so you'll get e.g. 836 832 <markup><br></markup> in the output. Elements that don't have an empty 837 833 content model, but are empty will be published with a start and end tag 838 (i.e. <markup><div></div></markup>).</ item>839 < term><lit>xhtml==1</lit></term><item>This gives &html; compatible &xhtml;.834 (i.e. <markup><div></div></markup>).</dd> 835 <dt><lit>xhtml==1</lit></dt><dd>This gives &html; compatible &xhtml;. 840 836 Elements with an empty content model will be published like this: 841 <markup><br /></markup> (This is the default).</ item>842 < term><lit>xhtml==2</lit></term><item>This gives full &xml; output. Every empty837 <markup><br /></markup> (This is the default).</dd> 838 <dt><lit>xhtml==2</lit></dt><dd>This gives full &xml; output. Every empty 843 839 element will be published with an empty tag (without an additional space): 844 <markup><br/></markup> or <markup><div/></markup>.</ item>840 <markup><br/></markup> or <markup><div/></markup>.</dd> 845 841 </dl> 846 842 </section> -
docs/Misc.xml
r3128 r3131 24 24 This means:</p> 25 25 <ul> 26 < item>When you have a relative &url; (e.g. <lit>#top</lit>) generated by a <meth>convert</meth>27 call, this &url; will stay the same when publishing.</ item>28 < item>Base &url;s for parsing should never be relative: Relative base26 <li>When you have a relative &url; (e.g. <lit>#top</lit>) generated by a <meth>convert</meth> 27 call, this &url; will stay the same when publishing.</li> 28 <li>Base &url;s for parsing should never be relative: Relative base 29 29 &url;s will be prepended to all relative &url;s in the file, but this will not be 30 30 reverted for publishing. In most cases the base &url; should be a 31 <lit>root</lit> &url; when you parse local files.</ item>32 < item>When you parse remote web pages you can either31 <lit>root</lit> &url; when you parse local files.</li> 32 <li>When you parse remote web pages you can either 33 33 omit the <arg>base</arg> argument, so it will default to the 34 34 &url; being parsing, so that links, images, etc. on the page 35 35 will still point back to their original location, or you 36 36 might want to use the empty &url; <lit>URL()</lit> as the 37 base, so you'll get all &url;s in the page as they are.</ item>38 < item><p>When &xist; is used as a compiler for static pages, you're37 base, so you'll get all &url;s in the page as they are.</li> 38 <li><p>When &xist; is used as a compiler for static pages, you're 39 39 going to read source &xml; files, do a conversion and write the 40 40 result to a new target file. In this case you should probably … … 56 56 <p>When you use <lit>root:spam.html</lit> both for parsing 57 57 and publishing, <lit>#top</lit> will be written to the target file 58 as expected.</p></ item>58 as expected.</p></li> 59 59 </ul> 60 60 -
docs/Searching.xml
r3128 r3131 25 25 26 26 <dl> 27 < term><lit>True</lit></term><item>This tells <meth>walk</meth> to28 yield this node from the generator;</ item>29 < term><lit>False</lit></term><item>Don't yield this node from the generator;</item>30 < term><lit>enterattrs</lit></term><item>This is a global constant in27 <dt><lit>True</lit></dt><dd>This tells <meth>walk</meth> to 28 yield this node from the generator;</dd> 29 <dt><lit>False</lit></dt><dd>Don't yield this node from the generator;</dd> 30 <dt><lit>enterattrs</lit></dt><dd>This is a global constant in 31 31 <mod>ll.xist.xsc</mod> and tells <meth>walk</meth> to traverse 32 32 the attributes of this node (if it's an 33 33 <pyref class="Element"><class>Element</class></pyref>, otherwise this 34 option will be ignored);</ item>35 < term><lit>entercontent</lit></term><item>This is a global constant in34 option will be ignored);</dd> 35 <dt><lit>entercontent</lit></dt><dd>This is a global constant in 36 36 <mod>ll.xist.xsc</mod> and tells <meth>walk</meth> to traverse 37 37 the child nodes of this node (if it's an 38 38 <pyref class="Element"><class>Element</class></pyref>, otherwise this 39 option will be ignored);</ item>39 option will be ignored);</dd> 40 40 </dl> 41 41 -
src/ll/xist/__init__.py
r3128 r3131 34 34 <p>Some of the significant features of &xist; include:</p> 35 35 <ul> 36 < item>Easily extensible with new &xml; elements,</item>37 < item>Can be used for offline or online page generation,</item>38 < item>Allows embedding Python code in &xml; files,</item>39 < item>Supports separation of layout and logic,</item>40 < item>Can be used together with <a href="http://www.modpython.org/">mod_python</a>,36 <li>Easily extensible with new &xml; elements,</li> 37 <li>Can be used for offline or online page generation,</li> 38 <li>Allows embedding Python code in &xml; files,</li> 39 <li>Supports separation of layout and logic,</li> 40 <li>Can be used together with <a href="http://www.modpython.org/">mod_python</a>, 41 41 <a href="http://pywx.idyll.org/">PyWX</a> or <a href="http://webware.sf.net/">Webware</a> 42 to generate dynamic pages,</ item>43 < item>Fully supports Unicode and &xml; namespaces,</item>44 < item>Provides features to use &xist; together with &jsp;/Struts (when replacing45 Struts tag libraries with &xist; this speeds up pages by a factor of 5–10.)</ item>42 to generate dynamic pages,</li> 43 <li>Fully supports Unicode and &xml; namespaces,</li> 44 <li>Provides features to use &xist; together with &jsp;/Struts (when replacing 45 Struts tag libraries with &xist; this speeds up pages by a factor of 5–10.)</li> 46 46 </ul> 47 47 -
src/ll/xist/ns/tld.py
r3128 r3131 42 42 <p>An attribute definition is composed of:</p> 43 43 <ul> 44 <item>the attributes name (required)</item> 45 <item>if the attribute is required or optional (optional)</item> 46 <item>if the attributes value may be dynamically calculated at 47 runtime by a scriptlet expression (optional) 48 </item> 44 <li>the attributes name (required)</li> 45 <li>if the attribute is required or optional (optional)</li> 46 <li>if the attributes value may be dynamically calculated at runtime by a 47 scriptlet expression (optional)</li> 49 48 </ul> 50 49 """ … … 75 74 <p>There are currently three values specified:</p> 76 75 <ul> 77 < item><lit>tagdependent</lit>: The body of the tag is interpreted76 <li><lit>tagdependent</lit>: The body of the tag is interpreted 78 77 by the tag implementation itself, and is most likely in a 79 78 different <z>language</z>, e.g embedded &sql; statements. 80 </ item>81 < item><lit>JSP</lit>: The body of the tag contains nested &jsp; syntax</item>82 < item><lit>empty</lit>: The body must be empty</item>79 </li> 80 <li><lit>JSP</lit>: The body of the tag contains nested &jsp; syntax</li> 81 <li><lit>empty</lit>: The body must be empty</li> 83 82 </ul> 84 83 <p>The default (if not defined) is <lit>JSP</lit>.</p> … … 154 153 <p>The tag defines a unique tag in this tag library, defining:</p> 155 154 <ul> 156 < item>the unique tag/element name</item>157 < item>the subclass of <class>javax.servlet.jsp.tagext.Tag</class> implementation class</item>158 < item>an optional subclass of <class>javax.servlet.jsp.tagext.TagExtraInfo</class></item>159 < item>the body content type (hint)</item>160 < item>optional tag-specific information</item>161 < item>any attributes</item>155 <li>the unique tag/element name</li> 156 <li>the subclass of <class>javax.servlet.jsp.tagext.Tag</class> implementation class</li> 157 <li>an optional subclass of <class>javax.servlet.jsp.tagext.TagExtraInfo</class></li> 158 <li>the body content type (hint)</li> 159 <li>optional tag-specific information</li> 160 <li>any attributes</li> 162 161 </ul> 163 162 """ … … 203 202 <p>The taglib tag is the document root, it defines:</p> 204 203 <ul> 205 < item><lit>tlibversion</lit>: The version of the tag library implementation</item>206 < item><lit>jspversion</lit>: The version of JSP the tag library depends upon</item>207 < item><lit>shortname</lit>: A simple default short name that could be used by204 <li><lit>tlibversion</lit>: The version of the tag library implementation</li> 205 <li><lit>jspversion</lit>: The version of JSP the tag library depends upon</li> 206 <li><lit>shortname</lit>: A simple default short name that could be used by 208 207 a &jsp; authoring tool to create names with a mnemonic 209 208 value; for example, the it may be used as the prefered 210 209 prefix value in taglib directives. 211 </ item>212 < item><lit>uri</lit>: A &url; uniquely identifying this taglib</item>213 < item><lit>info</lit>: A simple string describing the <z>use</z> of210 </li> 211 <li><lit>uri</lit>: A &url; uniquely identifying this taglib</li> 212 <li><lit>info</lit>: A simple string describing the <z>use</z> of 214 213 this taglib, should be user discernable 215 </ item>214 </li> 216 215 </ul> 217 216 """ -
src/ll/xist/parsers.py
r3128 r3131 236 236 <p>Arguments have the following meaning:</p> 237 237 <dl> 238 < term><arg>parser</arg></term><item>an instance of the238 <dt><arg>parser</arg></dt><dd>an instance of the 239 239 <pyref class="Parser"><class>Parser</class></pyref> class (or any object 240 that provides the appropriate interface).</ item>241 242 < term><arg>prefixes</arg></term><item>a mapping that maps namespace240 that provides the appropriate interface).</dd> 241 242 <dt><arg>prefixes</arg></dt><dd>a mapping that maps namespace 243 243 prefixes to namespace names/modules) (or lists of namespace names/modules). 244 This is used to preinitialize the namespace prefix mapping.</ item>245 246 < term><arg>tidy</arg></term><item>If <arg>tidy</arg> is true,244 This is used to preinitialize the namespace prefix mapping.</dd> 245 246 <dt><arg>tidy</arg></dt><dd>If <arg>tidy</arg> is true, 247 247 <a href="http://xmlsoft.org/">libxml2</a>'s &html; parser will be 248 used for parsing broken &html;.</ item>249 250 < term><arg>loc</arg></term><item>Should location information be attached251 to the generated nodes?</ item>252 253 < term><arg>validate</arg></term><item>Should the parsed &xml; nodes be254 validated after parsing?</ item>255 256 < term><arg>encoding</arg></term><item>The default encoding to use, when the248 used for parsing broken &html;.</dd> 249 250 <dt><arg>loc</arg></dt><dd>Should location information be attached 251 to the generated nodes?</dd> 252 253 <dt><arg>validate</arg></dt><dd>Should the parsed &xml; nodes be 254 validated after parsing?</dd> 255 256 <dt><arg>encoding</arg></dt><dd>The default encoding to use, when the 257 257 source doesn't provide an encoding. The default <lit>None</lit> results in 258 the encoding being detected from the &xml; itself.</ item>259 260 < term><arg>pool</arg></term><item>A <pyref module="ll.xist.xsc" class="Pool"><class>ll.xist.xsc.Pool</class></pyref>261 object which will be used for instantiating all nodes during parsing.</ item>258 the encoding being detected from the &xml; itself.</dd> 259 260 <dt><arg>pool</arg></dt><dd>A <pyref module="ll.xist.xsc" class="Pool"><class>ll.xist.xsc.Pool</class></pyref> 261 object which will be used for instantiating all nodes during parsing.</dd> 262 262 </dl> 263 263 """ -
src/ll/xist/publishers.py
r3128 r3131 50 50 <p>With the parameter <arg>xhtml</arg> you can specify if you want &html; output:</p> 51 51 <dl> 52 < term>&html; (<lit><arg>xhtml</arg>==0</lit>)</term>53 < item>Elements with a empty content model will be published as54 <markup><foo></markup>.</ item>55 < term>&html; browser compatible &xml; (<lit><arg>xhtml</arg>==1</lit>)</term>56 < item>Elements with an empty content model will be published as <markup><foo /></markup>52 <dt>&html; (<lit><arg>xhtml</arg>==0</lit>)</dt> 53 <dd>Elements with a empty content model will be published as 54 <markup><foo></markup>.</dd> 55 <dt>&html; browser compatible &xml; (<lit><arg>xhtml</arg>==1</lit>)</dt> 56 <dd>Elements with an empty content model will be published as <markup><foo /></markup> 57 57 and others that just happen to be empty as <markup><foo></foo></markup>. This 58 is the default.</ item>59 < term>Pure &xml; (<lit><arg>xhtml</arg>==2</lit>)</term>60 < item>All empty elements will be published as <markup><foo/></markup>.</item>58 is the default.</dd> 59 <dt>Pure &xml; (<lit><arg>xhtml</arg>==2</lit>)</dt> 60 <dd>All empty elements will be published as <markup><foo/></markup>.</dd> 61 61 </dl> 62 62 … … 70 70 71 71 <dl> 72 < term><lit>False</lit></term>73 < item>Treat elements in this namespace as if they are not in any namespace72 <dt><lit>False</lit></dt> 73 <dd>Treat elements in this namespace as if they are not in any namespace 74 74 (if global attributes from this namespace are encountered, a prefix will 75 be used nonetheless).</item> 76 <term><lit>None</lit></term> 77 <item>Treat the namespace as the default namespaces (i.e. use unprefixed 78 element names). Global attributes will again result in a prefix.</item> 79 <term><lit>True</lit></term> 80 <item>The publisher uses a unique non-empty prefix for this namespace.</item> 81 <term>A string</term> 82 <item>Use this prefix for the namespace.</item> 75 be used nonetheless).</dd> 76 <dt><lit>None</lit></dt> 77 <dd>Treat the namespace as the default namespaces (i.e. use unprefixed 78 element names). Global attributes will again result in a prefix.</dd> 79 <dt><lit>True</lit></dt> 80 <dd>The publisher uses a unique non-empty prefix for this namespace.</dd> 81 <dt>A string</dt> 82 <dd>Use this prefix for the namespace.</dd> 83 </dl> 83 84 84 85 <p>If an element or attribute is encountered whose namespace is not in -
src/ll/xist/xsc.py
r3128 r3131 1013 1013 1014 1014 <dl> 1015 < term><lit>True</lit></term><item>This tells <meth>walk</meth> to1016 yield this node from the iterator.</ item>1017 < term><lit>False</lit></term><item>Don't yield this node from the iterator.</item>1018 < term><lit>enterattrs</lit></term><item>This is a global constant in1015 <dt><lit>True</lit></dt><dd>This tells <meth>walk</meth> to 1016 yield this node from the iterator.</dd> 1017 <dt><lit>False</lit></dt><dd>Don't yield this node from the iterator.</dd> 1018 <dt><lit>enterattrs</lit></dt><dd>This is a global constant in 1019 1019 <mod>ll.xist.xsc</mod> and tells <meth>walk</meth> to traverse 1020 1020 the attributes of this node (if it's an 1021 1021 <pyref class="Element"><class>Element</class></pyref>, otherwise this 1022 option will be ignored).</ item>1023 < term><lit>entercontent</lit></term><item>This is a global constant in1022 option will be ignored).</dd> 1023 <dt><lit>entercontent</lit></dt><dd>This is a global constant in 1024 1024 <mod>ll.xist.xsc</mod> and tells <meth>walk</meth> to traverse 1025 1025 the child nodes of this node (if it's an 1026 1026 <pyref class="Element"><class>Element</class></pyref>, otherwise this 1027 option will be ignored).</ item>1027 option will be ignored).</dd> 1028 1028 </dl> 1029 1029 … … 2816 2816 <p>Elements support the following class variables:</p> 2817 2817 <dl> 2818 < term><lit>model</lit></term><item>This is an object that is used for2818 <dt><lit>model</lit></dt><dd>This is an object that is used for 2819 2819 validating the content of the element. See the module 2820 2820 <pyref module="ll.xist.sims"><mod>ll.xist.sims</mod></pyref> 2821 2821 for more info. If <lit>model</lit> is <lit>None</lit> validation will 2822 be skipped, otherwise it will be performed when parsing or publishing.</ item>2823 2824 < term><lit>Attrs</lit></term><item>This is a class derived from2822 be skipped, otherwise it will be performed when parsing or publishing.</dd> 2823 2824 <dt><lit>Attrs</lit></dt><dd>This is a class derived from 2825 2825 <pyref class="Element.Attrs"><class>Element.Attrs</class></pyref> 2826 2826 and should define all attributes as classes nested inside this 2827 <class>Attrs</class> class.</ item>2828 2829 < term><lit>xmlns</lit></term><item>This is the name of the namespace this2830 element belong to.</ item>2831 2832 < term><lit>register</lit></term><item>If <lit>register</lit> is false the2833 element won't be registered with the parser.</ item>2834 2835 < term><lit>xmlname</lit></term><item>If the class name has to be different2827 <class>Attrs</class> class.</dd> 2828 2829 <dt><lit>xmlns</lit></dt><dd>This is the name of the namespace this 2830 element belong to.</dd> 2831 2832 <dt><lit>register</lit></dt><dd>If <lit>register</lit> is false the 2833 element won't be registered with the parser.</dd> 2834 2835 <dt><lit>xmlname</lit></dt><dd>If the class name has to be different 2836 2836 from the &xml; name (e.g. because the &xml; name is not a valid Python identifier) 2837 <lit>xmlname</lit> can be used to specify the real &xml; name.</ item>2837 <lit>xmlname</lit> can be used to specify the real &xml; name.</dd> 2838 2838 </dl> 2839 2839 """ … … 3422 3422 <p>Register <arg>object</arg> in the pool. <arg>object</arg> can be:</p> 3423 3423 <ul> 3424 < item>A <pyref class="Element"><class>Element</class></pyref>,3424 <li>A <pyref class="Element"><class>Element</class></pyref>, 3425 3425 <pyref class="ProcInst"><class>ProcInst</class></pyref>, 3426 3426 <pyref class="Entity"><class>Entity</class></pyref>, 3427 <pyref class="CharRef"><class>CharRef</class></pyref> class;</ item>3428 < item>An <pyref class="Attr"><class>Attr</class></pyref> class3429 for a global attribute;</ item>3430 < item>An <pyref class="Attrs"><class>Attrs</class></pyref> class3431 containing global attributes;</ item>3432 < item>A <class>dict</class> (all <class>Node</class> classes in the3427 <pyref class="CharRef"><class>CharRef</class></pyref> class;</li> 3428 <li>An <pyref class="Attr"><class>Attr</class></pyref> class 3429 for a global attribute;</li> 3430 <li>An <pyref class="Attrs"><class>Attrs</class></pyref> class 3431 containing global attributes;</li> 3432 <li>A <class>dict</class> (all <class>Node</class> classes in the 3433 3433 values will be registered, this makes it possible to e.g. register all 3434 local variables by passing <lit>vars()</lit>);</ item>3435 < item>A module (all <class>Node</class> classes in the3436 module will be registered);</ item>3434 local variables by passing <lit>vars()</lit>);</li> 3435 <li>A module (all <class>Node</class> classes in the 3436 module will be registered);</li> 3437 3437 </ul> 3438 3438 """