Commit cd1d5ddc authored by Nicolas Delaby's avatar Nicolas Delaby

small optimisation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25068 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ec355895
......@@ -154,13 +154,12 @@ class OOoBuilder(Implicit):
from lxml import etree
from lxml.etree import Element
from copy import deepcopy
if xsl_content is None:
raise ImportError
content_doc = etree.XML(content_xml)
if xsl_content is not None:
stylesheet_doc = etree.XML(xsl_content)
stylesheet = etree.XSLT(stylesheet_doc)
content_doc = etree.XML(content_xml)
result_doc = stylesheet(content_doc)
root = result_doc.getroot()
content_doc = stylesheet(content_doc)
root = content_doc.getroot()
#Declare zope namespaces
NSMAP = {'tal': 'http://xml.zope.org/namespaces/tal',
'i18n': 'http://xml.zope.org/namespaces/i18n',
......
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