Re: How to configure TraxProcessor in 2.2?
warrell harries <[email protected]> Thu, 5 Dec 2019 06:19:56 +0000
| Newsgroups | gmane.text.xml.cocoon.user |
|---|---|
| Message-ID | <CAL-6e7toE4BHKndi6cS3d2Nh3RiZRKo-H1yz4nLWcBJjry8J6Q@mail.gmail.com> |
--000000000000de0f220598eeebe3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Mark, I never could get 2.2 working =F0=9F=98=82 However, I'm using 2.12 every day, all over the world - mostly with Saxon for XSLT 2.0 All I can advise, use 2.12... Best regards Warrell On Wed, 4 Dec 2019, 9:46 pm Mark H. Wood, <[email protected]> wrote: > I'm using Cocoon 2.2. I need to pass a custom XSLT transformer > factory (that wraps Saxon's to configure it) to TraxProcessor, and the > advice I've found in several places around the Web doesn't seem to be > working: my factory class never gets instantiated. > > I've got a file META-INF/cocoon/avalon/cocoon-core-saxon-xslt.xconf: > > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > <components> > <component role=3D"org.apache.excalibur.xml.xslt.XSLTProcessor/saxon" > class=3D"org.apache.cocoon.components.xslt.TraxProcessor"> > <parameter name=3D"use-store" value=3D"true"/> > <parameter name=3D"transformer-factory" > value=3D"org.dspace.saxon.ConfigurableTransformerFactory"/= > > </component> > </components> > > I also tried copying it to WEB-INF/cocoon and it didnt' seem to work > there either. > > I do have <configurator:settings/> and <avalon:bridge/> in the Spring > config. > > Is there some way to debug component configuration and see if the file > is even being looked for (and where *is* configuration looking)? The > Cocoon site directs me to Excalibur, which directs me to Avalon, which > says that Avalon is wound up and directs me back to Excalibur.... > > > > I've also tried to configure the thing using Spring: > > <bean name=3D'org.apache.excalibur.xml.xslt.XSLTProcessor/saxon' > class=3D'org.apache.cocoon.components.xslt.TraxProcessor' > init-method=3D'initialize' > destroy-method=3D'dispose'> > <!--property name=3D'use-store' value=3D'true'/--> > <property name=3D'transformerFactory' > value=3D'org.dspace.saxon.ConfigurableTransformerFactory'= /> > </bean> > > but so far I'm missing something: TraxProcessor.sourceToSAX throws an > NPE. I'm probably not setting the parameters correctly -- there isn't > a setter for use-store at all, for example. > > I've found any number of pages that tell me Avalon configuration is > being replaced by Spring, but nothing practical on how to convert > Avalon configuration (such as the first sample above) to Spring, or > even how to write fresh Spring configuration for Cocoon components. > It would be nice to know how to do this even if I wind up using the > Avalon approach with the present task. > > -- > Mark H. Wood > Lead Technology Analyst > > University Library > Indiana University - Purdue University Indianapolis > 755 W. Michigan Street > Indianapolis, IN 46202 > 317-274-0749 > www.ulib.iupui.edu > --000000000000de0f220598eeebe3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Hi Mark,<div dir=3D"auto"><br></div><div dir=3D"auto">I n= ever could get 2.2 working =F0=9F=98=82</div><div dir=3D"auto"><br></div><d= iv dir=3D"auto">However, I'm using 2.12 every day, all over the world -= mostly with Saxon for XSLT 2.0</div><div dir=3D"auto"><br></div><div dir= =3D"auto">All I can advise, use 2.12...</div><div dir=3D"auto"><br></div><d= iv dir=3D"auto">Best regards=C2=A0</div><div dir=3D"auto"><br></div><div di= r=3D"auto">Warrell=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto"= ><br></div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div></div><b= r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, = 4 Dec 2019, 9:46 pm Mark H. Wood, <<a href=3D"mailto:[email protected]">mw= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" sty= le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'= m using Cocoon 2.2.=C2=A0 I need to pass a custom XSLT transformer<br> factory (that wraps Saxon's to configure it) to TraxProcessor, and the<= br> advice I've found in several places around the Web doesn't seem to = be<br> working:=C2=A0 my factory class never gets instantiated.<br> <br> I've got a file META-INF/cocoon/avalon/cocoon-core-saxon-xslt.xconf:<br= > <br> <?xml version=3D"1.0" encoding=3D"UTF-8"?><br> <components><br> =C2=A0 <component role=3D"org.apache.excalibur.xml.xslt.XSLTProcess= or/saxon"<br> =C2=A0 =C2=A0 class=3D"org.apache.cocoon.components.xslt.TraxProcessor= "><br> =C2=A0 =C2=A0 <parameter name=3D"use-store" value=3D"true= "/><br> =C2=A0 =C2=A0 <parameter name=3D"transformer-factory"<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value=3D"org.ds= pace.saxon.ConfigurableTransformerFactory"/><br> =C2=A0 </component><br> </components><br> <br> I also tried copying it to WEB-INF/cocoon and it didnt' seem to work<br= > there either.<br> <br> I do have <configurator:settings/> and <avalon:bridge/> in the = Spring<br> config.<br> <br> Is there some way to debug component configuration and see if the file<br> is even being looked for (and where *is* configuration looking)?=C2=A0 The<= br> Cocoon site directs me to Excalibur, which directs me to Avalon, which<br> says that Avalon is wound up and directs me back to Excalibur....<br> <br> <br> <br> I've also tried to configure the thing using Spring:<br> <br> =C2=A0 =C2=A0 <bean name=3D'org.apache.excalibur.xml.xslt.XSLTProces= sor/saxon'<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 class=3D'org.apache.cocoon.component= s.xslt.TraxProcessor'<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 init-method=3D'initialize'<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 destroy-method=3D'dispose'><b= r> =C2=A0 =C2=A0 =C2=A0 <!--property name=3D'use-store' value=3D= 9;true'/--><br> =C2=A0 =C2=A0 =C2=A0 <property name=3D'transformerFactory'<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 value=3D'org.ds= pace.saxon.ConfigurableTransformerFactory'/><br> =C2=A0 =C2=A0 </bean><br> <br> but so far I'm missing something:=C2=A0 TraxProcessor.sourceToSAX throw= s an<br> NPE.=C2=A0 I'm probably not setting the parameters correctly -- there i= sn't<br> a setter for use-store at all, for example.<br> <br> I've found any number of pages that tell me Avalon configuration is<br> being replaced by Spring, but nothing practical on how to convert<br> Avalon configuration (such as the first sample above) to Spring, or<br> even how to write fresh Spring configuration for Cocoon components.<br> It would be nice to know how to do this even if I wind up using the<br> Avalon approach with the present task.<br> <br> -- <br> Mark H. Wood<br> Lead Technology Analyst<br> <br> University Library<br> Indiana University - Purdue University Indianapolis<br> 755 W. Michigan Street<br> Indianapolis, IN 46202<br> 317-274-0749<br> <a href=3D"http://www.ulib.iupui.edu" rel=3D"noreferrer noreferrer" target= =3D"_blank">www.ulib.iupui.edu</a><br> </blockquote></div> --000000000000de0f220598eeebe3--