|
Subject: Re: [xsl] Saxon and Python From: Lars Marius Garshol <larsga@xxxxxxxxxxxxxxx> Date: 11 Jun 2001 10:26:18 +0200 |
* Gustaf Liljegren
|
| I need to write an XSLT extension, and the language of choise for me
| right now is Python. Is there any hope that I can write extentions
| in Python that works in Instant Saxon, or Saxon?
* Michael Kay
|
| Only if you can make your Python code look to Saxon like a Java
| class, e.g. by writing a wrapper.
This is no problem at all with Jython.
[larsga@pc36 larsga]$ jython
Jython 2.0 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from java.util import HashMap
>>> class DemoClass:
... def say_hello(self):
... print "I'm a Python object!"
...
>>> hash = HashMap()
>>> hash.put("hello", DemoClass())
>>> hash.get("hello").say_hello()
I'm a Python object!
--Lars M.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Saxon and Python, Michael Kay | Thread | [xsl] XSLT Editor, Fawsy Bendeck |
| RE: [xsl] Saxon and Python, Michael Kay | Date | [xsl] XSLT Editor, Fawsy Bendeck |
| Month |