RE: xsltc w/ 2.0.3
I (religiously) use the stock 2.0.3 jars. I definitely had to make some changes in my xslt, because of bugs in my code that xsltc uncovered, but also (I think) because of bugs in xsltc. (Actually, even though I got my app to run under xsltc, I'm considering switching to Saxon because of the quirks in xsltc--for example I can't get xsltc variables to hold a temporary tree). I think it is important to clear out your tomcat work directory, and to start with simple transforms and work your way up. Expect to do some debugging. Steve -Original Message- From: Jeremy Green [mailto:jeremy;glowbead.com] Sent: Tuesday, October 22, 2002 1:45 PM To: [EMAIL PROTECTED] Subject: xsltc w/ 2.0.3 Hello, From browsing the list it looks like it is possible to get xsltc working with Cocoon 2.0.3, and I was hoping someone could provide me with just a bit more information. I've followed the instructions given here: http://outerthought.net/wiki/Wiki.jsp?page=XSLTC My question really boils down to this: Which jars do I need to have in my WEB-INF/lib directory to make this work correctly? Do I need to upgrade to new versions of some of the other jars? (Xalan, xerces, etc...) I'm using Cocoon 2.0.3 with the JBoss-2.4.4_Tomcat-4.0.1-beta bundle. I've tried a variety of things and nothing seems to work. Currently I have xsltc-20020723.jar in there, and I get the following Exception back in my browser. An error occurred org.apache.cocoon.ProcessingException Exception in creating Transform Handler org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: java.lang.NullPointerException Original exception : java.lang.NullPointerException at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransfor merHandler(TransformerFactoryImpl.java:640) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransfo rmerHandler(XSLTProcessorImpl.java:282) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransfo rmerHandler(XSLTProcessorImpl.java:239) at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTra nsformer.java:298) at org.apache.cocoon.components.pipeline.AbstractEventPipeline.se tupPipeline(AbstractEventPipeline.java:215) at The jboss log contains this error: [13:22:34,925,Default] java.lang.ClassCastException: org.apache.xalan.xsltc.compiler.Param [13:22:34,925,Default]at org.apache.xalan.xsltc.compiler.SymbolTable.addVariable(Symbol Table.java:120) [13:22:34,926,Default] [13:22:34,926,Default]at org.apache.xalan.xsltc.compiler.Variable.parseContents(Variabl e.java:141) [13:22:34,926,Default] [13:22:34,926,Default]at org.apache.xalan.xsltc.compiler.Stylesheet.parseOwnChildren(St ylesheet.java:412) [13:22:34,926,Default] [13:22:34,926,Default]at org.apache.xalan.xsltc.compiler.Stylesheet.parseContents(Style sheet.java:394) [13:22:34,926,Default] [13:22:34,926,Default]at org.apache.xalan.xsltc.compiler.Import.parseContents(Import.java:143) [13:22:34,926,Default] Any help would be appreciated. Thanks, Jeremy - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Xsltc and 2.0.3
Stephen Ng wrote: Is it possible to plug xsltc into 2.0.3? Try following this: http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html Vadim I tried substituting in sitemap.xmap: map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer logger=sitemap.transformer.xsltc pool-max=32 pool-min=8 pool-grow=2 use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db use-delifalse/use-deli transformer-factoryorg.apache.xalan.xsltc.trax.TransformerFactoryImpl /transformer-factory /map:transformer and adding xsltc-20020723.jar to my lib directory, but it doesn't seem to do anything (e.g. it doesn't complain if xsltc is missing, or if I change TransformerFactoryImpl to FooBarImpl). I thought about changing cocoon.xconf: xslt-processor class=org.apache.cocoon.components.xslt.XSLTProcessorImpl logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=false/ /xslt-processor But I'm not sure what I'd put here. Thanks, Steve - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Xsltc and 2.0.3
The magic words seem to be: xslt-processor class=org.apache.cocoon.components.xslt.XSLTProcessorImpl logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=true/ parameter name=transformer-factory value=org.apache.xalan.xsltc.trax.TransformerFactoryImpl/ /xslt-processor But if I drop this into the 2.0.3 cocoon.xconf, I get an NPE: at java.lang.Thread.run(Thread.java:484) java.lang.NullPointerException at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransformerHandler (TransformerFactoryImpl.java:593) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandle r(XSLTProcessorImpl.java:282) at org.apache.cocoon.components.language.markup.Logicsheet.getTransformerHa ndler(Logicsheet.java:160) Should I give up and wait for 2.0.4/2.1 for xsltc? Thanks, Steve -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Friday, September 06, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: Re: Xsltc and 2.0.3 Stephen Ng wrote: Is it possible to plug xsltc into 2.0.3? Try following this: http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html Vadim I tried substituting in sitemap.xmap: map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer logger=sitemap.transformer.xsltc pool-max=32 pool-min=8 pool-grow=2 use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db use-delifalse/use-deli transformer-factoryorg.apache.xalan.xsltc.trax.TransformerF actoryImpl /transformer-factory /map:transformer and adding xsltc-20020723.jar to my lib directory, but it doesn't seem to do anything (e.g. it doesn't complain if xsltc is missing, or if I change TransformerFactoryImpl to FooBarImpl). I thought about changing cocoon.xconf: xslt-processor class=org.apache.cocoon.components.xslt.XSLTProcessorImpl logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=false/ /xslt-processor But I'm not sure what I'd put here. Thanks, Steve - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Xsltc and 2.0.3
Stephen Ng wrote: The magic words seem to be: xslt-processor class=org.apache.cocoon.components.xslt.XSLTProcessorImpl logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=true/ parameter name=transformer-factory value=org.apache.xalan.xsltc.trax.TransformerFactoryImpl/ /xslt-processor But if I drop this into the 2.0.3 cocoon.xconf, I get an NPE: at java.lang.Thread.run(Thread.java:484) java.lang.NullPointerException at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransformerHandler (TransformerFactoryImpl.java:593) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandle r(XSLTProcessorImpl.java:282) at org.apache.cocoon.components.language.markup.Logicsheet.getTransformerHa ndler(Logicsheet.java:160) Should I give up and wait for 2.0.4/2.1 for xsltc? Don't know; have not tried it personally with 2.0.3 (it's slower then saxon for me). One thing I do remember: xsltc some time ago was not able to compile sitemap because of Java extentions, and nobody yet reported that it's possible to completely replace Xalan with XSLTC. Try leaving default transformer Xalan, and adding second one as XSLTC and use it only on your stylesheets. Thus, system will run on Xalan, and XSLTC will be chosen only when you tell it. Vadim Thanks, Steve -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Friday, September 06, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: Re: Xsltc and 2.0.3 Stephen Ng wrote: Is it possible to plug xsltc into 2.0.3? Try following this: http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html Vadim I tried substituting in sitemap.xmap: map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer logger=sitemap.transformer.xsltc pool-max=32 pool-min=8 pool-grow=2 use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db use-delifalse/use-deli transformer-factoryorg.apache.xalan.xsltc.trax.TransformerF actoryImpl /transformer-factory /map:transformer and adding xsltc-20020723.jar to my lib directory, but it doesn't seem to do anything (e.g. it doesn't complain if xsltc is missing, or if I change TransformerFactoryImpl to FooBarImpl). I thought about changing cocoon.xconf: xslt-processor class=org.apache.cocoon.components.xslt.XSLTProcessorImpl logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=false/ /xslt-processor But I'm not sure what I'd put here. Thanks, Steve - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Xsltc and 2.0.3
-Original Message- From: Stephen Ng [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 5:56 PM To: [EMAIL PROTECTED] Subject: Xsltc and 2.0.3 Is it possible to plug xsltc into 2.0.3? I tried substituting in sitemap.xmap: map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer logger=sitemap.transformer.xsltc pool-max=32 pool-min=8 pool-grow=2 use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db use-delifalse/use-deli transformer-factoryorg.apache.xalan.xsltc.trax.TransformerFa ctoryImpl /transformer-factory /map:transformer I think transformer-factory/transformer-factory should be configured in cocoon.xconf and not in the sitemap and adding xsltc-20020723.jar to my lib directory, but it doesn't seem to do anything (e.g. it doesn't complain if xsltc is missing, or if I change TransformerFactoryImpl to FooBarImpl). I thought about changing cocoon.xconf: xslt-processor class=org.apache.cocoon.components.xslt.XSLTProcessorImpl logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=false/ /xslt-processor But I'm not sure what I'd put here. Thanks, Steve - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]