davidcarlisle / web-xslt

XSLT and javascript code intended mostly for manipulating MathML and OpenMath.
Other
69 stars 25 forks source link

Python lxml fails to load pmml2texfrag.xsl #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm following the instructions in: http://codespeak.net/lxml/xpathxslt.html#xslt

$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.etree
>>> doc = lxml.etree.parse(file('pmml2texfrag.xsl'))
>>> xslt = etree.XSLT(doc)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'etree' is not defined
>>> xslt = lxml.etree.XSLT(doc)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "xslt.pxi", line 399, in lxml.etree.XSLT.__init__ (src/lxml/lxml.etree.c:107912)
lxml.etree.XSLTParseError: Attribute 'p': Failed to compile the expression 
'sum($position,@position/number(.))' in the AVT.
>>> 

This could, of course, be a lxml issue (but I don't know either way).

Jonathan

Original issue reported on code.google.com by Jonathan.Fine1@googlemail.com on 25 Jan 2011 at 2:10

GoogleCodeExporter commented 9 years ago
This is an XSLT2 stylesheet.

Original comment by d.p.carl...@gmail.com on 12 Feb 2011 at 7:42