[Erp5-report] r25068 - /erp5/trunk/products/ERP5OOo/OOoUtils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jan 8 18:59:50 CET 2009
Author: nicolas
Date: Thu Jan 8 18:59:49 2009
New Revision: 25068
URL: http://svn.erp5.org?rev=25068&view=rev
Log:
small optimisation
Modified:
erp5/trunk/products/ERP5OOo/OOoUtils.py
Modified: erp5/trunk/products/ERP5OOo/OOoUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/OOoUtils.py?rev=25068&r1=25067&r2=25068&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoUtils.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/OOoUtils.py [utf8] Thu Jan 8 18:59:49 2009
@@ -154,13 +154,12 @@
from lxml import etree
from lxml.etree import Element
from copy import deepcopy
- if xsl_content is None:
- raise ImportError
- 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()
+ if xsl_content is not None:
+ stylesheet_doc = etree.XML(xsl_content)
+ stylesheet = etree.XSLT(stylesheet_doc)
+ 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',
More information about the Erp5-report
mailing list