[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Saxon and Python

Subject: Re: Saxon and Python
From: Lars Marius Garshol <larsga@xxxxxxxxxxxxxxx>
Date: 11 Jun 2001 10:26:18 +0200
python hashmap
* 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.