summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2009-12-24 02:51:02 -0500
committerKohei Yoshida <kyoshida@novell.com>2009-12-24 02:51:02 -0500
commit7ab8695fad3e71b66fd8184cea117979cc62527f (patch)
tree6a77a64926ba58803409b767046b99eb76f2f372
parentaf4f5ef75456be351a811c88337a6a1489978a24 (diff)
Added support for linking, but it's not quote working yet.
-rw-r--r--source/docbook.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/docbook.py b/source/docbook.py
index 4a94bca..7cc17dc 100644
--- a/source/docbook.py
+++ b/source/docbook.py
@@ -136,9 +136,10 @@ class DocBookConverter:
elif src.name == 'content':
# this element has 'title' and 'path' attributes, and has no more child nodes.
title = src.getAttr('title')
+ xhppath = src.getAttr('path')
sect = DocBookConverter.startSubSection(dest)
+ sect.setAttr('id', xhppath)
sect.appendElement('title').appendContent(title)
- xhppath = src.getAttr('path')
if self.xhproots.has_key(xhppath):
self.__getContentFromXHP(xhppath, sect)
else:
@@ -215,7 +216,13 @@ class DocBookConverter:
self.__walkAllChildNodes(src, li)
elif src.name == 'link':
- self.__walkAllChildNodes(src, dest)
+ href = src.getAttr('href')
+ if href.startswith('text/scalc'):
+ link = dest.appendElement('link')
+ link.setAttr('linkend', href)
+ self.__walkAllChildNodes(src, link)
+ else:
+ self.__walkAllChildNodes(src, dest)
elif src.name == 'paragraph':
# normal paragraph content.