ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank E. Weiss" <fra...@well.com>
Subject Re: Xalan 2.2.0 exceptions fail the style task for multiple sources
Date Sat, 02 Feb 2002 22:16:55 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message