Frank, I believe I have solved at least the first of your problems, from your note 03/17/2002 "problem with apply-templates in content of with-param".
The problem had to do with calling a variable within an RTF that is being passed in a xsl:with-param. The first RTF screwed up the access of the frame for the second variable ref. Inside an xsl:with-param is a tricky situation, because we are accessing variables from behind the frame that we are defining. Anyway, I'm guessing, but do not know, that this will also fix your "Stylesheet Reuse NullPointerException" bug. HOWEVER, it's a little surprising that any of this would be related to stylesheet reuse, so maybe not. Can you run off the current CVS, or do you need me to send you a jar to try out? -scott "Frank E. Weiss" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] 03/19/2002 10:05 Subject: Re: Stylesheet Reuse NullPointerException PM [EMAIL PROTECTED] wrote: > > So I suspect both problems are a result of using a document template as > the content of a with-param. > > Yep. I think you gave me enough data to figure out what's going on. > Because I have to do this along with a feature implementation, it will > probably take me a day or two to fix it. Say, by end-of-day Thursday. > > I would hold off on your work-arounds. I suspect they will work, but it's > a lot of extra effort if I can just fix the bug. Thanks, Scott. I'll look forward to the fix. > > > > The order of documents being tranformed affects how many get transformed > correctly before it breaks. Hugo > > Ferreira also > > noted: > > 1) reusing a stylesheet (limited amount of time, from 4 to 7 times works > ok) > > The rate at which the transformer is used influences this exception. > > It's still not clear if concurrent access is occuring. The last sentence > suggests that it is occuring. > Not sure about Hugo's code. Here's mine: public static void exampleTransformerReuse(Vector sources, String xslID) throws TransformerException, TransformerConfigurationException { TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer transformer = tfactory.newTransformer(new StreamSource(xslID)); for (Enumeration e=sources.elements(); e.hasMoreElements(); ) { String sourceID = (String)e.nextElement(); System.out.println("\n=========" + sourceID + "\n"); transformer.transform( new StreamSource(baseDir + sourceID), new StreamResult(destDir + sourceID)); } }