Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 21974 invoked from network); 30 Jan 2011 14:26:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jan 2011 14:26:18 -0000 Received: (qmail 32821 invoked by uid 500); 30 Jan 2011 14:26:17 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 32732 invoked by uid 500); 30 Jan 2011 14:26:15 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Delivered-To: moderator for dev@cocoon.apache.org Received: (qmail 78800 invoked by uid 99); 30 Jan 2011 12:42:29 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Subject: Re: Cocoon 2.2, STX block, TraxTransformer, transformer-factory Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-19-256540551 From: Huib Verweij In-Reply-To: <5F56B052-0CCF-4459-94D5-899866F31E2B@mpi.nl> Date: Sun, 30 Jan 2011 13:42:00 +0100 Message-Id: <89E15F4E-072D-41F7-9435-D8988CD540CE@mpi.nl> References: <5F56B052-0CCF-4459-94D5-899866F31E2B@mpi.nl> To: dev@cocoon.apache.org X-Mailer: Apple Mail (2.1082) --Apple-Mail-19-256540551 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Looking further into it I found that defining a separate "XSLT = processor" allows me to use the STX transformer: in META-INF/cocoon/avalan/cocoon-core-xslt-stx.xconf I now have: and in META-INF/cocoon/avalan/sitemap-transformers-stx-tansformer.xconf = I have: =20 =20 stx and it works! Excellent! So I answered my own question. I always have the same thing with = directions as well: the moment I ask for directions, I'm almost there = ;-). Huib Verweij. Op 30 jan 2011, om 12:59 heeft Huib Verweij het volgende geschreven: > Hi, >=20 > I'd like to use the STX block in Cocoon 2.2, but it doesn't work, I = get the same error as mentioned here: = http://www.mail-archive.com/dev@cocoon.apache.org/msg52324.html = ("stylesheet requires attribute version"). >=20 > I think the problem is in the TraxTransformer that no longer supports = the "transformer-factory" config option (the Cocoon 2.1.11 version = does).In the stx block the stx transformer is declared like this: >=20 > logger=3D"sitemap.transformer.stx" > = src=3D"org.apache.cocoon.transformation.TraxTransformer"> > = net.sf.joost.trax.TransformerFactoryImpl > >=20 > so it is using the "transformer-factory" config option. So what = happens is, I think, the default transformer factory for XSLT = stylesheets is used, it generates a transformer, which is a XSLT = transformer, which checks for the version attribute on the = element, which does not exist in the STX stylesheet, = and it generates the above error. Or something like that. >=20 > So, do you have any tips on how to get this working again?=20 >=20 > Huib Verweij. >=20 --Apple-Mail-19-256540551 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
in = META-INF/cocoon/avalan/cocoon-core-xslt-stx.xconf I now = have:
<components>
 
<component role=3D"org.apache.excalibur.xml.xslt.XSLTProcessor/stx"
  class=3D"org.apache.cocoon.components.xslt.TraxProcessor">
 
<parameter name=3D"transformer-factory" = value=3D"net.sf.joost.trax.TransformerFactoryImpl"/>
 
</component>
</components>


and = in META-INF/cocoon/avalan/sitemap-transformers-stx-tansformer.xconf = I have:

xmlns:map=3D"http://apache.org/cocoon/sit= emap/1.0">
   
   
<map:transformers>       
       
<map:transformer name=3D"stx" src=3D"org.apache.cocoon.transformation.TraxTransformer">
            = <xslt-processor-role>stx</xslt-processor-role>
       
</map:transformer>
   
</map:transformers>
</map:components>

and it = works! Excellent!

So I answered my own = question. I always have the same thing with directions as well: the = moment I ask for directions, I'm almost there = ;-).

Huib = Verweij.


Op 30 jan 2011, om = 12:59 heeft Huib Verweij het volgende geschreven:

Hi,

I'd like = to use the STX block in Cocoon 2.2, but it doesn't work, I get the same = error as mentioned here: h= ttp://www.mail-archive.com/dev@cocoon.apache.org/msg52324.html = ("stylesheet requires attribute version").

I = think the problem is in the TraxTransformer that no longer supports the = "transformer-factory" config option (the Cocoon 2.1.11 version does).In = the stx block the stx transformer is declared like = this:

<map:transformer name=3D"stx"
         =             logger=3D"sitemap.transformer.stx"
         =             src=3D"org.apache.cocoon.transformation.TraxTransformer">
       
<transformer-factory>net.sf.joost.trax.TransformerFactoryImpl</transformer-factory>
   
</map:transformer>

so= it is using the "transformer-factory" config option. So what happens = is, I think, the default transformer factory for XSLT stylesheets is = used, it generates a transformer, which is a XSLT transformer, which = checks for the version attribute on the <xsl:stylesheet/> element, = which does not exist in the STX stylesheet, and it generates the above = error. Or something like that.

So, do you have = any tips on how to get this working = again? 

Huib = Verweij.


= --Apple-Mail-19-256540551--