|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Saxon and Python
* 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








