TransformerFactory.newInstance().newTransformer(streamSource) が null を返すのはどうしてでしょうか。javadoc によると、これは不可能です: http://download.oracle.com/javase/6/docs/api/javax/xml/transform/TransformerFactory.html#newTransformer(javax.xml.transform.Source)
ここにグルーヴィーなコードサンプルがあります
def is = new ClassPathResource('xslt/MySpace-Contact.xsl').inputStream
println is
def streamSource = new StreamSource(is)
println streamSource
def factory = TransformerFactory.newInstance()
println factory
def tr = factory.newTransformer(streamSource)
println tr
出力は次のとおりです。
--Output from testTransformation--
java.io.BufferedInputStream@32999f10
javax.xml.transform.stream.StreamSource@399ed64
org.apache.xalan.processor.TransformerFactoryImpl@6eb04214
null