Re: problem with transformer
Francesco Chicchiriccò <[email protected]> Fri, 27 Jun 2014 09:38:06 +0200
| Newsgroups | gmane.text.xml.cocoon.user |
|---|---|
| Message-ID | <[email protected]> |
On 27/06/2014 08:09, Wicket und Cocoon wrote:
> I am using 3.0.0-beta-1-SNAPSHOT.
> I have a problem with the following pipeline:
>
> <map:match pattern="controllerxbrief/xml/{file}">
> <map:generate src="controller/xml/ST/{map:file}.xml"
> type="controller-aware-string-template" />
> <map:transform type="xinclude">
> <map:parameter name="cacheKey" value="{map:0}"/>
> </map:transform>
> <map:transform
> src="controller/xml/velocity/xbriefe/identity.xsl">
> </map:transform>
> <map:serialize type="xml"/>
> </map:match>
>
> When I omit the last transform everything is ok.
>
> The Last transform is the identity transform:
>
> <?xml version="1.0" ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xi="http://www.w3.org/2001/XInclude"
> xmlns:fo="http://www.w3.org/1999/XSL/Format" >
> <xsl:template match="/ | @* | node()">
> <xsl:copy>
> <xsl:apply-templates select="@* | node()" />
> </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
>
> With this transform I get the following error:
>
> <exception-reportclass="org.apache.cocoon.pipeline.SetupException"timestamp="Fri,
> 27 Jun 2014 07:58:18 +0200">
> <message>Could not initialize transformer handler.</message>
> <cause/>
> <stacktraceCause>
> java.lang.NullPointerException at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:701)
> at
> org.apache.cocoon.sax.component.XSLTTransformer.setSAXConsumer(XSLTTransformer.java:278)
> at [...]
>
> when I implant this transform in the xinclude example in the
> aggregation part everything works fine.
>
> Also in a programmed pipeline the example works.
Hi,
these findings let me suspect that you are probably not referring
correctly your identity XSLT in the sitemap.xmap: have you already taken
a look at cocoon-sample-wicket-webapp [1]? Under
src/main/webapp/sitemap.xmap there is a basic pipeline with an XSLT
transformation.
HTH
Regards.
[1]
https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample-wicket-webapp
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/