I have duplicated the NullPointer and ArrayIndexOutOfBounds exceptions with a 
stand-alone test. I have joined the xalan-j mail
list to try to resolve this problem. I'll give feedback to Ant if necessary. BTW the 
failure is sensitive to the order and
number of input documents you try to transform. Here's the stand-alone code that  
bombs when trying to do 2 or more transforms
while reusing the stylesheet:

 public static void exampleTransformerReuse(Vector sources, String xslID)
 throws TransformerException, TransformerConfigurationException
 {
  TransformerFactory tfactory = TransformerFactory.newInstance();
  Transformer transformer = tfactory.newTransformer(new StreamSource(baseDir + 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));

  }
 }

P.S. I used the Xalan examples trax code instead of the Ant TraxLiaison code. They 
both gave me identical exception behavior,
even though the Ant code takes some precautions to close the files after each 
tranformation.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to