Commit 072b4834 authored by Nicolas Delaby's avatar Nicolas Delaby

Fix xpath expression

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31068 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2789125e
......@@ -933,7 +933,7 @@ class ODTStrategy(ODFStrategy):
return element_tree
parent_node_xpath = '//text:reference-mark-start[@text:name="%s"]/parent::*[1]' % field_id
parent_node = element_tree.xpath(parent_node_xpath, namespaces=element_tree.nsmap)[0]
text_reference_position = int(parent_node.xpath('count(preceding-sibling::text:reference-mark-start)', namespaces=element_tree.nsmap))
text_reference_position = int(parent_node.xpath('count(text:reference-mark-start/preceding-sibling::*)', namespaces=element_tree.nsmap))
#Delete all contents between <text:reference-mark-start/> and <text:reference-mark-end/>
#Try to fetch style-name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment