From 22ec1a591b08a88a661ec197e2ab5f460de1c36a Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 18 Jan 2010 17:04:40 -0500 Subject: Use ulink element for handling URLs. --- source/docbook.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/docbook.py b/source/docbook.py index fa21b23..054651b 100644 --- a/source/docbook.py +++ b/source/docbook.py @@ -332,10 +332,13 @@ class DocBookConverter: elif src.name == 'link': href = src.getAttr('href') - link = dest.appendElement('link') - if not href.startswith('http'): + if href.startswith('http'): + link = dest.appendElement('ulink') + link.setAttr('url', href) + else: + link = dest.appendElement('link') href = globals.encodeID(href) - link.setAttr('linkend', href) + link.setAttr('linkend', href) self.__walkAllChildNodes(src, link) elif src.name == 'ahelp': -- cgit v1.2.3