Hunsberger, Peter wrote:

In attempting to work around the problem I'm having with Cocoon blowing
up on my validation flow I tried to implement a wrapper class around


        org.apache.excalibur.xml.xslt.XSLTProcessor

My wrapper is just a simple class that inherits from XSLTProcessor,
calls it and catches any exceptions instead of throwing the exception
(it may eventually return a result giving the error if I can get this
working).  The problem is that I can't seem to get it invoked instead of
the regular XSLTprocessor.  In my cocoon.xconf I have:

  <component logger="core.xslt-processor"

role="org.stjude.ct.transformation.XSLTProcessorWrapper/wrappedSaxon7"
            class="org.stjude.ct.transformation.XSLTProcessorWrapper">
    <parameter name="use-store" value="true"/>
    <parameter name="transformer-factory"
value="net.sf.saxon.TransformerFactoryImpl"/>
 </component>

Then in my sitemap I have:

           <map:transformer name="xslt-wrappedSaxon7" pool-grow="2"
pool-max="32" pool-min="8"
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>

<use-browser-capabilities-db>false</use-browser-capabilities-db>

<xslt-processor-role>org.stjude.ct.transformation.XSLTProcessorWrapper/w
rappedSaxon7</xslt-processor-role>
           </map:transformer>

I went as far as adding my wrapper class to the jar that contains the
base XSLTProcessor but no matter what I do Cocoon gives:

org.apache.cocoon.ProcessingException: Lookup of transformer
'xslt-wrappedSaxon7' failed at file:/zzzz/sitemap.xmap:769:100:
org.apache.avalon.framework.component.ComponentException: transformers:
ComponentSelector could not access the Component for hint
[xslt-wrappedSaxon7] (key [xslt-wrappedSaxon7])

Anyone know what I'm missing?



Hmm... what if you name the role of the new component "org.apache.excalibur.xml.xslt.XSLTProcessor/wrappedSaxon7", and use <xslt-processor-role>wrappedSaxon7</xslt-processor-role> ?


Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Reply via email to