The presence of org.apache.xalan.transformer.TransformerIdentityImpl.transform in the error message (as well as the fact that the error message is in German) reveals that you have loaded the Xalan implementation of JAXP instead of the Saxon implementation. So it's a classpath/configuration problem.
The problem is that the Saxon code (line 136 in net.sf.saxon.query.QueryResult) does:
Transformer copier = TransformerFactory.newInstance().newTransformer();
which loads a TransformerFactory according to settings of system properties and the class path. I have already changed the code for the next version so it forces the Saxon implementation to be loaded. For now, you could either change this line to:
Transformer copier = TransformerFactoryImpl.newInstance().newTransformer();
or force the Saxon version to be loaded by ensuring that the system property javax.xml.transform.TransformerFactory is set to the value "net.sf.saxon.TransformerFactoryImpl" (which you can do using the -D option on the Java command line).
Michael Kay
-----Original Message-----
From: [] On Behalf Of Maik Thiele
Sent: 12 August 2003 23:56
Subject: [saxon] Output problem

I have a problem to serialize my query result. I am wrapping
the result to the object DocumentInfo. Serializing this object
got my following error:
javax.xml.transform.TransformerException: Transformation einer Quelle vom Typ net.sf.saxon.tinytree.TinyDocumentImpl nicht möglich
But all my results are from the type TinyDocumentImpl.
How I can serialize this to an XML document?
Many thanks..
my code:
String dummy = "d:\\1.xml";
Configuration config = new Configuration();
QueryProcessor qp = new QueryProcessor(config, context);
XQueryExpression compiled_query = qp.compileQuery(query);
DynamicQueryContext querycontext = new DynamicQueryContext();
Source src = new StreamSource(dummy);
DocumentInfo document = qp.buildDocument(src);
SequenceIterator results = compiled_query.iterator(querycontext);
OutputStream destination = new FileOutputStream("d:\\xmltest\\1.xml");
DocumentInfo resultDoc = QueryResult.wrap(results, NamePool.getDefaultNamePool());
QueryResult.serialize((NodeInfo)resultDoc, new StreamResult(destination),

javax.xml.transform.TransformerException: Transformation einer Quelle vom Typ net.sf.saxon.tinytree.TinyDocumentImpl nicht möglich at org.apache.xalan.transformer.TransformerIdentityImpl.transform( at net.sf.saxon.query.QueryResult.serialize( at net.sf.saxon.XQueryDB.executeQuery( at net.sf.saxon.test2.main( Exception in thread "main" Process Exit...