Tom,

Were the replies to your request satisfactory?

Are you able to continue work on XLTC & Cocoon?


Ivelin

----- Original Message -----
From: "Tom Amiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Ivelin Ivanov" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 2:34 PM
Subject: Re: XSLTC and Cocoon


> Hi,
>
> After modifying ./documentation/stylesheets/book2menu.xsl so XSLTC
> could compile it, I got to the next problem, which doesn't appear
> to be XSLTC related.
>
> After bringing up the http://localhost:8080/cocoon and clicking on
> the Documentation link, it throws
>
>    java.lang.NullPointerException
>         at
org.apache.cocoon.components.notification.DefaultNotifyingBuilder.build(Defa
ultNotifyingBuilder.java:111)
>         at
org.apache.cocoon.components.notification.DefaultNotifyingBuilder.build(Defa
ultNotifyingBuilder.java:170)
>         at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1083)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
>         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
>
> The error happens in a block that traps a SAXParserException on the
following line of
> code
>
> n.addExtraDescription("location",     sourceLocator.getSystemId());
>
> What do you suggest you/we do to get further?
>
> --
>  Tom Amiro -- SQA Engineer
>  Sun XML Technology Development
>  voice: 781-442-0589 Fax: 781-442-1437
>  eMail: tom.amiro@.sun.com
>
> Tom Amiro wrote:
> >
> > Stefano and Ivelin,
> >
> > I was able to use the war file you sent us -- as you suggested in the
> > following quote -- to investigate the problems with XSLTC.
> >
> > > Since many bugs that I find in xsltc aren't simply reproducible by
> > > running the scripts from command line, I prepared a WAR file with a
> > > prebuild Cocoon that uses Xalan XSLTC as the XSLT processor for some
> > > parts of it.
> > >
> > > 1) the /status page
> > > 2) the /documentation/* pages
> > >
> > > You can find the WAR package here:
> > >
> > >  http://www.apache.org/~stefano/dist/cocoon_with_xsltc-20020420.war
> > >
> > > To install it on your servlet container of choice follow the
> > > instructions at:
> >
> > Note, I replaced the version of the XSLTC jar in the war file with the
> > latest version of xsltc.jar.
> >
> > When I click on the documentation link, the following error is thrown
> >
> >    java.lang.VerifyError: (class: book2menu, method: applyTemplates
signature:
> >
(Lorg/apache/xalan/xsltc/DOM;Lorg/apache/xalan/xsltc/NodeIterator;Lorg/apach
e/xalan/xsltc/TransletOutputHandler;)V)
> >    Unable to pop operand off an empty stack
> >         at java.lang.Class.newInstance0(Native Method)
> >         at java.lang.Class.newInstance(Class.java:232)
> >         at
org.apache.xalan.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.
java:234)
> >         at
org.apache.xalan.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:
259)
> >         at
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(Tra
nsformerFactoryImpl.java:588)
> >         at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:241)
> >         at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
306)
> >
> > Looking at book2menu.xsl, there was an error the stylesheet. It had
> >
> >      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> >            xmlns:NetUtils="org.apache.cocoon.util.NetUtils"
> >
> > but the url for the external java function should be
> >
> >
xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUt
ils"
> >
> > XSLTC couldn't compile the stylesheet because of this syntax error.
> >
> > After correcting the stylesheet, XSLTC still has a problem with
> >
> >      <xsl:variable name="encLabel"
select="NetUtils:encodePath(@label)"/>
> >
> > because @label is of type nodeset and NetUtils.java expects a string as
show in the snippet below
> >
> >      * @param path the path to encode
> >      * @return the encoded path
> >      */
> >      public static String encodePath(String path) {
> >
> > So you need to cast the @label nodest to a string, e.g.,
> >
> >      <xsl:variable name="encLabel"
select="NetUtils:encodePath(string(@label))"/>
> >
> > It doesn't look like encLabel is even used.
> >
> > I'll see what happens next after changing book2menu to get past this
problem.
> > Just wanted to let you know that we are working on it.
> >
> > --
> >  Tom Amiro -- SQA Engineer
> >  Sun XML Technology Development
> >  voice: 781-442-0589 Fax: 781-442-1437
> >  eMail: tom.amiro@.sun.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to