From 8bebd7371adb7f67e5ba6caecf085f221e6c4731 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 24 Dec 2009 00:17:57 -0500 Subject: Handle switchline and item elements. --- source/docbook.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/docbook.py b/source/docbook.py index 2f86f5e..d97dbd5 100644 --- a/source/docbook.py +++ b/source/docbook.py @@ -180,6 +180,17 @@ class DocBookConverter: dest.appendElement('warning').appendContent('take embedded content from ' + href) else: dest = self.__walkXHP(embed, dest) + + elif src.name == 'switchinline': + # For now, always select the child element. + content = src.firstChildByName('defaultinline').getContent() + dest.appendContent(content) + + elif src.name == 'item': + # an element has a 'type' attribute that specifies how this + # text span should be formatted. + dest.appendContent(src.getContent()) + elif src.name == 'link': for child in src.getChildNodes(): self.__walkXHP(child, dest) -- cgit v1.2.3