Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python lxml fails to load pmml2texfrag.xsl #2

Open
GoogleCodeExporter opened this issue Dec 17, 2015 · 1 comment
Open

Python lxml fails to load pmml2texfrag.xsl #2

GoogleCodeExporter opened this issue Dec 17, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 25 Jan 2011 at 2:10

@GoogleCodeExporter
Copy link
Author

This is an XSLT2 stylesheet.

Original comment by [email protected] on 12 Feb 2011 at 7:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant