This file is indexed.

/usr/share/doc/python-simpletal/html/api-simpletal.html is in python-simpletal 4.1-9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>SimpleTAL API: simpleTAL Module</title>
	<link href="../style/site.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>SimpleTAL API: simpleTAL Module</h1>
  <p id="subject">Documentation on how to use the simpleTAL Module.</p>
  <div><h2>simpleTAL</h2>
<p>Two helper functions are provided for convenience, one for compiling HTML templates, and one for compiling XML templates.&nbsp; If an error is encountered during compilation (for example mismatched TAL tags or bad syntax) an TemplateParseException will be thrown.</p>
<h3>compileHTMLTemplate (template, inputEncoding="ISO-8859-1", minimizeBooleanAtts=0)</h3>
<p>Compiles the passed in HTML template into an instance of the 'Template' class.&nbsp; The template object should be either a string containing the template, or a file-like object.&nbsp; The inputEncoding specifies the encoding that the template was written using and deafults to iso-8859-1.&nbsp; The minimizeBooleanAtts flag controls whether HTML boolean attributes (e.g. &lt;img ismap&gt;) should be written out in minimized form.&nbsp; See below for details of how to use the Template class.</p>
<h3>compileXMLTemplate (template)</h3>
<p>Compiles the passed in XML template into an instance of the 'Template' class.&nbsp; The template object should be either a string containing the template, or a file-like object.&nbsp; The XML template must be a well formed XML document.&nbsp; The character set will be determined from the prolog of the template or be assumed to be utf-8.&nbsp; See below for details of how to use the Template class.</p>
<h3>compileDOMTemplate (dom)</h3>
<p>Compiles an XML template that is stored as a DOM tree.&nbsp; This requires PyXML to be installed to function.&nbsp; </p>
<h3>Template Instances</h3>
<p>The compiled templates contain all of the logic required to be able to expand themselves for a given context.&nbsp; They can be kept around and reused as often as required, there is no need or benefit to re-compiling them unless the underlying template changes.&nbsp; They have one method of interest as part of the external API:</p>
<pre>
<code>
def expand (self, context, outputFile[,outputEncoding] [,docType][,suppressXMLDeclaration])
</code>
</pre>
<p>This method will expand the template, using the simpleTALES.Context object provided, and write the output into the given file-like object.&nbsp; If the template is a HTML template then the result will, by default, be encoded in iso-8859-1.&nbsp; If no outputEncoding is specified and the template is an XML template then it will default to utf-8.</p>
<p>The docType and suppressXMLDeclaration variables apply only to XML Templates.&nbsp; </p>
<p>Python's support for XML does not currently extend to the LexicalHandler API, which is required for an application to be able to read an XML documents DOCTYPE.&nbsp; If <a href="http://pyxml.sourceforge.net/">pyXML</a> is installed SimpleTAL will make use of it to determine the XML DOCTYPE, otherwise the doctype must be passed as a named variable to the expand method.</p>
<p>For example to produce a valid strict XHTML document without pyXML use:</p>
<pre>
<code>
template.expand (context, outputFile, docType='&lt;!DOCTYPE html&nbsp; PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;')
</code>
</pre>
<p>If the suppressXMLDeclaration is set to true then the XML Declaration will not be included in the output (required for XHTML in IE6).</p>
<p><a href="api.html">Back to SimpleTAL API</a></p>
</div>
	  
  <p id="version">PubTal Version </p>
  <div id="footer">
  <p>File: api-simpletal.txt</p>
  <p>Last modified: Sun, 23 Oct 2005 16:35:10 EDT</p>
  <p>Copyright 2005 Colin Stewart</p>
  <p title="PubTal is a template driven web site publisher.">Made with <a href="http://www.owlfish.com/software/PubTal/">PubTal</a> 3.1.3</p>
  </div>
</body>