Example source code

This file lists all the examples for which there is a source code file available, and includes links to each individual file, together with the title and number of the example.

7. Using XML parsers

7-3    A little xmlproc application    py/parsers/xmlproc_little.py
7-4    xmlproc application converting RSS to HTML    py/parsers/xmlproc_rss2html.py
7-9    The pyexpat RSS to HTML converter    py/parsers/pyexpat_rss2html.py
7-10    A general external entity implementation    py/parsers/pyexpat_extent.py
7-11    A simple xmllib application    py/parsers/xmllib_simple.py
7-13    An xmllib application that collects statistics about documents    py/parsers/xmllib_stats.py
7-16    RSS to HTML conversion application written with xmllib    py/parsers/xmllib_rss2html.py
7-18    The sgmlop statistics application    py/parsers/sgmlop_stats.py

8. SAX: An introduction

8-1    A very simple SAX application    py/sax/elem_count.py
8-3    The SAX RSS to HTML converter    py/sax/sax_rss2html.py
8-4    A SAX statistics collector    py/sax/stats.py
8-6    An XML normalizer    py/sax/normalizer.py

9. Using SAX

9-3    An XBEL to HTML converter    py/sax/xbel2html.py
9-4    Redesigned XBEL to HTML converter    py/sax/xbel2html2.py
9-5    The XBEL information model    py/sax/xbellib_model.py
9-6    An XBEL representation builder    py/sax/xbellib_builder.py
9-7    An XBEL document serializer    py/sax/xbellib_dumper.py
9-8    The XBEL to HTML converter based on xbellib    py/sax/xbel2html3.py
9-10    The RSS to HTML converter, using SAXTracker    py/sax/sax_rss2html2.py
9-12    An API for generating XML output    py/sax/xmlgen.py
9-13    The improved XBEL serializer    py/sax/xbellib_dumper2.py
9-16    SAX application for converting the plays to HTML    py/sax/play2html.py
9-17    The CSS stylesheet    py/play.css
9-22    Optimized version of the play converter    py/sax/play2html-opt.py
9-23    The play to HTML converter using dispatch tables    py/sax/play2html-opt2.py

10. Advanced SAX

10-2    An RSS 1.0 to HTML converter    py/sax/rss2html-ns.py
10-3    The character joiner filter    py/sax/cjf_filter.py
10-7    A parser filter for attribute inheritance    py/sax/attrinh_filter.py
10-10    The source code of the XInclude filter    py/sax/xinclude.py
10-16    A SAX XMLReader for emails    py/sax/mailreader.py

11. An introduction to the DOM

11-7    RSS to HTML converter written using the DOM    py/dom/rss2html.py

12. Using the DOM

12-6    Inserting an item into an RSS document    py/dom/rss_modify.py
12-10    The domutils module    py/dom/domutils.py
12-11    A DOM-based XBEL to HTML converter    py/dom/xbel2htmld.py
12-12    Converting plays to HTML using the DOM    py/dom/play2htmld.py
12-13    Serialization using the DOM    py/dom/xbellib2dom.py
12-14    A DOM to SAX converter    py/dom/dom2sax.py

13. Advanced DOM

13-5    A DOM traversal namespace filter    py/dom/nsfilter.py

14. Other tree-based APIs

14-3    A qp_xml RSS to HTML converter    py/qp_rss2html.py

16. XSLT in more detail

16-8    An example of HTML output    py/xslt/html.xslt
16-25    Testing for support for an extension element type    py/xslt/ext-element.xslt
16-26    Using fallback instead of element-available    py/xslt/fallback.xslt
16-34    The RFC index to HTML stylesheet    py/xslt/rfc2html.xslt

17. Using XSLT in applications

17-1    A simple 4XSLT wrapper    py/xslt/run4xslt.py
17-2    A simple Writer implementation    py/xslt/textwriter.py
17-4    A 4DOM reader    py/xslt/domreader.py
17-5    An XPath extension function module    py/xslt/extfunc.py
17-6    An XSLT extension element type    py/xslt/extelem.py
17-7    A simple Sablotron runner    py/xslt/runsablot.py
17-8    A SAX adapter    py/xslt/saxhandler.py
17-9    The xpathutils module    py/xslt/xpathutils.py
17-10    rfc2html using group and item    py/xslt/rfc2html3.xslt
17-11    The group and item element types    py/xslt/group_by.py
17-12    The RFC-index to bookmark converter    py/xslt/rfc2opera.py
17-14    The xpathgen module    py/xslt/xpathgen.py
17-15    The XPath searching utility    py/xslt/xpath-query.py
17-17    A document analyzer    py/xslt/analyze.py
17-19    An object mapping for RSS 0.9    py/xslt/rssmap.xml
17-20    The xml2obj module    py/xslt/xml2obj.py

18. Architectural forms

18-5    Adding backslash support to rsslib    py/xslt/rssarch.py

19. SAX in Java

19-1    A JAXP demo    java/JAXPDemo.java
19-3    RSS to HTML, in Java    java/SAXRSS2HTML.java
19-4    The Java SAXTracker    java/SAXTracker.java
19-5    A simpler RSSHandler    java/SAXRSS2HTML2.java
19-6    The XBEL object structure classes    java/xbel/*.java
19-7    The XBEL structure builder    java/xbel/XBEL*.java

20. DOM in Java

20-3    RSS to HTML with Xerces    java/DOMRSS2HTML.java
20-4    Reimplementing the buildDocument method using JAXP    java/DOMRSS2HTML2.java
20-6    JDOM RSS to HTML converter    java/JDOMRSS2HTML.java

21. Using XSLT in Java applications

21-1    An XSLT runner using JAXP    java/XSLTRunner.java
21-3    SAXON extension element types    java/SAXONExtensions.java

22. Other approaches to processing

22-4    The RSS to HTML converter using RXP    py/rxp-rss2html.py
22-5    Pyxie RSS to HTML converter    py/pyxie-rss2html.py
22-6    Pyxie xTree RSS to HTML translator    py/pyxie-rss2html2.py
22-7    RSS to HTML translator using Dispatch    py/pyxie-rss2html3.py
22-8    The Shakespeare plays implemented with Pyxie    py/pyxie-play2html.py
22-9    The RSS to HTML converter as an eventdom application    py/evtdom-rss2html.py
22-10    The XBEL to HTML converter with eventdom    py/evtdom-xbel2html.py
22-11    A Shakespeare to HTML converter with eventdom    py/evtdom-play2html.py

23. Schemas

23-3    The SAX RSS translator, now with error handling    py/sax/rss2html-val.py
23-4    A DTD normalizer    py/dtdnorm.py
23-6    DTD-based random document generator    py/random-doc.py

24. Creating XML

24-2    Regular expression link extractor    py/extrlinks.py
24-8    The monitoring script    py/watchw3.py
24-9    A table of contents generator for this book    py/pysp-make-toc.py
24-10    The table of contents generator again    py/sax/drv_pysp-make-toc.py

26. The RSS development kit

26-6    The config module implementation    py/rsskit/config.py
26-7    The clientlib module implementation    py/rsskit/clientlib.py
26-8    The RSS email client code    py/rsskit/rss-email.py
26-13    The RSS editor code    py/rsskit/rss-editor.py

A. A lightning introduction to Python

A-21    Counting page hits    py/pagehits.py
A-28    A simple Python module (ostest.py)    py/ostest.py