cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Ng" <stephen...@verizon.net>
Subject Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)
Date Tue, 21 May 2002 14:32:04 GMT
I've been struggling with getting Saxon 6.5.2 and Cocoon 2.0.2 working
together for a couple of days now....

Here's what I did and what I found:

1. I replaced xalan-2.3.1 with saxon.jar.
2. I grabbed v1.9 of xsp.xsl
(http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoo
n/components/language/markup/xsp/java/xsp.xsl)

I started getting (intermittent) null pointer errors trying to resolve
static files.  I had a sub-sitemap with:

"context://dir/data.xml"

Changing these to just

"dir/data.xml"

made a set of them go away.  (Does this make any sense?)

But I continue to get NPE's in the resolver code.  They came from

XSLTProcessorImpl::resolve() {
//...

  File parent = new File(base.substring(5));
  File parent2 = new File(parent.getParentFile(), href);
  xslSource = resolver.resolve(parent2.toURL().toExternalForm());

}

Turns out "resolver" was null.

I looked in CVS, and the whole mechanism for getting a resolver appears
to have been rewritten.  So, as a hack, I just check for null in
setSourceResolver.  (I have *no idea* what I'm doing here, folks).

public void setSourceResolver(SourceResolver resolver) {
  if (resolver!=null)
         this.resolver = resolver;
}

Now I have no more NPE's, but I still have a resolver problem
somewhere--one of my pipelines is failing because it can't locate a
stylesheet.  Still have to figure that one out.

But, now my app is running enough that I can time it.  Well,  I'm
getting it's between 10% to 25% faster, which is not nearly as much as
I'd hoped.  (A quick test showed Saxon 7 to be a tad slower, but it
might just be noise.)  (My app is currently taking about 2.2 seconds to
serve a page (1.7 Ghz P4, 512MB Ram, WinXP), of which I figure no more
than .5 sec is due to database access, and the rest I think is Cocoon
time.  I'm really gunning for sub-second response for a demo next week.)

Should I upgrade to CVS 2.0.3 and try again?  (I know this is a stupid
question, but how close is it to being soup?)  Or keep plugging at
2.0.2?  Or wait for 2.0.3 to ship?  Best thing would be XSLTC!  

Steve




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message