On Wed, 2004-02-18 at 07:37, [EMAIL PROTECTED] wrote: > I'm using xalan J 2.5.2 with JDK 1.3 > While processing an xsl file with a Java extension I'm getting this > error... > > Line #29; Column #36; XSLT Error > (javax.xml.transform.TransformerException): > java.util.EmptyStackException > > It occurs when there is more than one matching node in the xml file. > i.e., if I have only one matching node there is no error & the xsl is > procesed as expected. > > any ideas?
Is there a stack dump associated with the exception? If so, please post it. If you don't get a stack dump, you may need to register an xslt error listener in order to get this info (see javax.xml.transform.Transformer.setErrorListener). Create a subclass of ErrorListener, and in the handler methods dump the exception stack trace somewhere convenient (eg to System.err) before throwing it. I presume this exception is being generated as a side-effect of the doSelect method I posted to you, which uses XPath.getExpression().execute(). However I have never experienced the problem you describe above. What versions of xalan and xerces are you using? Note that if you are using java1.4 or later, then by default it will use the xalan implementation distributed with java1.4, *not* the one in your classpath. See the FAQs for ways around this. Regards, Simon
