Problem using Xalan-J from Jython

Jorgen Frojk Kjaersgaard jfk at informaticon.dk
Fri Apr 6 08:43:51 EDT 2001


I'm investigating various XML processors under Python and
Jython. Trying to run a simple test of Xalan-J
(http://xml.apache.org/xalan-j) on Sun JDK 1.1.8 on Linux, the whole
JVM crashes with a SIGSEGV.

My code is a simple imitation of the SimpleTransform.java example
included in Xalan:

from javax.xml.transform import TransformerFactory
import javax.xml.transform.Transformer
import javax.xml.transform.stream.StreamSource
import javax.xml.transform.stream.StreamResult
import javax.xml.transform.TransformerException
import javax.xml.transform.TransformerConfigurationException

import java.io.FileOutputStream
import java.io.FileNotFoundException
import java.io.IOException

tFactory = TransformerFactory.newInstance()
transformer = tFactory.newTransformer(StreamSource("birds.xsl"))
transformer.transform(StreamSource("birds.xml"), StreamResult(FileOutputStream("birds.out")));


It crashes during the call of TransformerFactory.newInstance, so the
fact that the other imports aren't right doesn't matter for the
moment. Am I doing something wrong, or doesn't Xalan work under Jython
at all?

thanks, jfk

-- 
Jørgen Frøjk Kjærsgaard, Systemkonsulent (Systems Consultant)
Inform at ticon ApS * Web: www.informaticon.dk * Tlf: 8672 0093
Internet programmering * Systemudvikling på Linux, FreeBSD og PalmOS



More information about the Python-list mailing list