diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-07-14 17:39:22 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-07-14 17:39:22 +0200 |
commit | 2c40a12f3307ac3a72f6036a9a2f8939fd7b77c8 (patch) | |
tree | eeacf431bc9ea2ab1bd4ab61e978c78766b46a7c /l10ntools/scripts | |
parent | txtl10n: #i113008# #i113125# cleanup (diff) | |
download | core-2c40a12f3307ac3a72f6036a9a2f8939fd7b77c8.tar.gz core-2c40a12f3307ac3a72f6036a9a2f8939fd7b77c8.zip |
txtl10n: #i113008# #i113125# skip on empty string
Diffstat (limited to 'l10ntools/scripts')
-rw-r--r-- | l10ntools/scripts/tool/xhtex.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py index ab6e1dd14631..c427a7feccdd 100644 --- a/l10ntools/scripts/tool/xhtex.py +++ b/l10ntools/scripts/tool/xhtex.py @@ -39,14 +39,15 @@ class Xhtex(AbstractL10nTool): def extract_topic(self, list, inputfile): topics = [] for elem in list: - if elem.childNodes[0].nodeType == elem.TEXT_NODE: + if elem.childNodes[0].nodeType == elem.TEXT_NODE and len(elem.childNodes[0].data.strip()): topics.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.childNodes[0].data, inputfile=inputfile)) return topics def extract_title(self, list, inputfile): titles = [] for elem in list: - titles.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.getAttribute("title").strip(), inputfile=inputfile)) + if len(elem.getAttribute("title").strip()): + titles.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.getAttribute("title").strip(), inputfile=inputfile)) return titles # Merge methods |