![](https://secure.gravatar.com/avatar/d67eea2ce18dd70f4642cb971c2c5ad2.jpg?s=120&d=mm&r=g)
Paul Everitt wrote:
Also, thanks for the work on XSLT extension functions (and the other work as well). I hope to try out the extension functions during the coming days.
Hi Stephan. I just read through the namespace_extensions.txt you checked in on your branch. First, I admit, I didn't realize you were doing it this way. It's a lot more interesting and exciting than I thought. :^) I don't know if you ever saw XBL in Mozilla, but it reminds me a bit of those ideas. My biggest question regards XSLT. You mention at the end that you can put a free-standing function in a namespace and call it from an XPath, presumably passing in arguments, etc. Will this also work from inside an XSLT processor? Two other small questions on the element binding. Are constructors and attributes (class or instance) allowed? Finally, a series of questions to understand the concepts involved. Can the element methods return an element, and thus be traversable? Imagine HonkElement having a method "honkstyles" that returned a nodeset of "honkstyle" entries. As XML text it would look like: <honk> <honkstyles> <style>quack</style> <style>alarm</style> </honkstyles> </honk> ...except the <honkstyles> and children didn't exist in the source XML. They are dynamically generated from Python, perhaps from a database, as you traversed it:
honk_styles = honk_element.honkstyles print len(honk_styles) 2
Presumably, XPath wouldn't work in getting <honkstyles>, but once gotten, things would work:
len(honk_element.xpath("honkstyles/style")) 0 len(honk_styles.xpath("style")) 2
--Paul