summaryrefslogtreecommitdiff
path: root/doc/mkhtml.py
diff options
context:
space:
mode:
authorStefan Behnel <scoder@users.berlios.de>2011-02-17 07:04:47 +0100
committerStefan Behnel <scoder@users.berlios.de>2011-02-17 07:04:47 +0100
commit70f4defc6e94f0340d6a6dbed552b0338c6419ef (patch)
treee84f59018f3101b156fe5f8123c290780130042a /doc/mkhtml.py
parent3144d592a4fcf403dc031454e960286fe7e9ec7d (diff)
downloadpython-lxml-70f4defc6e94f0340d6a6dbed552b0338c6419ef.tar.gz
fix heading of main page
--HG-- branch : trunk
Diffstat (limited to 'doc/mkhtml.py')
-rw-r--r--doc/mkhtml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/mkhtml.py b/doc/mkhtml.py
index 20d5120a..23cbf211 100644
--- a/doc/mkhtml.py
+++ b/doc/mkhtml.py
@@ -16,6 +16,7 @@ htmlnsmap = {"h" : XHTML_NS}
find_title = XPath("/h:html/h:head/h:title/text()", namespaces=htmlnsmap)
find_title_tag = XPath("/h:html/h:head/h:title", namespaces=htmlnsmap)
find_headings = XPath("//h:h1[not(@class)]//text()", namespaces=htmlnsmap)
+find_heading_tag = XPath("//h:h1[@class = 'title'][1]", namespaces=htmlnsmap)
find_menu = XPath("//h:ul[@id=$name]", namespaces=htmlnsmap)
find_page_end = XPath("/h:html/h:body/h:div[last()]", namespaces=htmlnsmap)
@@ -160,6 +161,9 @@ def publish(dirname, lxml_path, release):
title = find_title_tag(new_tree)
if title and title[0].text == 'lxml':
title[0].text = "lxml - Processing XML and HTML with Python"
+ heading = find_heading_tag(new_tree)
+ if heading:
+ heading[0].text = "lxml - XML and HTML with Python"
new_tree.write(outpath)
if __name__ == '__main__':