Hello Fred, Though I am not familiar with the TraxTransformer, I know that the TraxTransformer is used for an incoming SAX stream, which does not enable DOM. It does not seem to be parameterizable either.
Take a look at the DeliTransformer, that seems to be able to transform with parameters... http://www.ucc.ie:8080/cocoon/docs/apidocs/org/apache/cocoon/transformation/DeliTransformer.html hope this helps, AS > > > Hello, > > Last week I got the XMLFile input module working for a > project at work. Since > we want to use XPath 2.0 in our XSLT transformations, I > wanted to use Saxon8 > as the default XSLT processor in Cocoon. > > Using Cocoon 2.1.8 under Tomcat 5. > > To use Saxon I used the following steps: > > 1. Downloaded the Saxon-B 8.1.6 zipfile from > http://saxon.sourceforge.net and > unpacked it in an empty directory. > > 2. Copied file saxon8.jar to the webapps/cocoon/WEB-INF/lib/ directory > > 3. In cocoon.xconf uncommented the Saxon XSLT Processor component: > > <component > logger="core.xslt" > role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon" > class="org.apache.cocoon.components.xslt.TraxProcessor"> > <parameter name="use-store" value="true"/> > <parameter name="transformer-factory" > value="net.sf.saxon.TransformerFactoryImpl"/> > </component> > > 4. In cocoon's sitemap.xmap, replaced transformer with name > 'xslt' using Xalan > with Saxon's processor: > > <map:transformer > name="xslt" > logger="sitemap.transformer.xslt" > pool-max="32" > src="org.apache.cocoon.transformation.TraxTransformer"> > <use-request-parameters>false</use-request-parameters> > <use-session-parameters>false</use-session-parameters> > <use-cookie-parameters>false</use-cookie-parameters> > <xslt-processor-role>saxon</xslt-processor-role> > <check-includes>true</check-includes> > </map:transformer> > > 5. Restarted Tomcat5 > > Normal transformations work as expected, but when I use > expressions like > <map:parameter name="proj" value="{pprotoconf:/conf/proj}"/> > in the sitemap > (these use the XMLFile input module), I get an error: > > java.lang.IllegalArgumentException: Unknown type of result: > class javax.xml.transform.dom.DOMResult > > Start of the stacktrace: > > java.lang.IllegalArgumentException: Unknown type of result: class > javax.xml.transform.dom.DOMResult > at > > net.sf.saxon.event.ResultWrapper.getReceiver(ResultWrapper.java:142) > at > > net.sf.saxon.IdentityTransformerHandler.startDocument(Identity > TransformerHandler.java:94) > at > > org.apache.cocoon.xml.AbstractXMLPipe.startDocument(AbstractXM > LPipe.java:47) > at > org.apache.xerces.parsers.AbstractSAXParser.startDocument(Unknown > Source) > at > org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown > Source) > at > > org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown > Source) > at > org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at > org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > > When I replace '{pprotoconf:/conf/proj}' in the sitemap with > a constant > string, the problem disappears. When I restore all changes > and use Xalan again > as the default XSLT transformer, using the XMLFile imput > module works again. > > Does anyone know what's the problem? > > Thanks for your help. > > Fred > > -- > |E R > | D F > | > |fred at fredvos dot org > |5235 DG 52 NL +31 73 6411833 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
