Extension Elements/Functions can only return XML nodes in node sets.
Bug #446654 reported by
John Krukoff
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Wishlist
|
scoder |
Bug Description
XPath/XSLT extension functions/elements can only return XML nodes for extension elements, but can accept a wider range of inputs. For instance, with a simple echo extension function:
def extension( context, input ):
return input
A "This is not a node" error is raised for a node set selection that includes text nodes (i.e. "//text()"). Ideally, extension functions should be able to return data of any type they accept. Tested with lxml 2.2.2.
Discussed on the mailing list here:
http://
To post a comment you must log in.
Implemented for strings in trunk rev. 68558:
https:/ /codespeak. net/viewvc/ ?view=rev& revision= 68558
Numbers and booleans are trickier as they would have to pass through string values. It's not clear to me how to make this work nicely. I think strings are the most important use case anyway.