summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2009-12-24 00:05:48 -0500
committerKohei Yoshida <kyoshida@novell.com>2009-12-24 00:05:48 -0500
commit3e3884cd3193f8b01ce22332a27ecb49ce4714d7 (patch)
tree2c9b95919f1d04ce2249ebf9fd17f57f70a02528
parent5427d68bd598aedc336336781d5252904affbde9 (diff)
Convert <emph> elements.
-rw-r--r--source/docbook.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/docbook.py b/source/docbook.py
index e19767b..2f86f5e 100644
--- a/source/docbook.py
+++ b/source/docbook.py
@@ -167,7 +167,7 @@ class DocBookConverter:
# content node.
content = src.content.strip()
if len(content) > 0:
- dest.appendElement('warning').appendContent("unhandled content : '%s'"%src.content.strip())
+ dest.appendContent(content)
elif src.name == 'comment':
# we can ignore these elements.
@@ -181,7 +181,8 @@ class DocBookConverter:
else:
dest = self.__walkXHP(embed, dest)
elif src.name == 'link':
- dest.appendElement('para').appendContent(src.getContent())
+ for child in src.getChildNodes():
+ self.__walkXHP(child, dest)
elif src.name == 'paragraph':
# normal paragraph content.
@@ -196,7 +197,11 @@ class DocBookConverter:
return elem
else:
para = dest.appendElement('para')
- para.appendContent(src.getContent())
+ for child in src.getChildNodes():
+ self.__walkXHP(child, para)
+
+ elif src.name == 'emph':
+ dest.appendElement('emphasis').appendContent(src.getContent())
elif src.name == 'section' or src.name == 'variable':
# we can probably just ignore this element for now. Section elements