[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Errors when trying to use Xalan instead of Saxon


Subject: [xsl] Errors when trying to use Xalan instead of Saxon
From: "Jason Silva" <jason.silva@xxxxxxxxxxx>
Date: Mon, 22 Jul 2002 14:40:08 -0400

Hello all,
 
I was wondering if anyone knew of any differences between the Saxon 6.5.1 parser and the Xalan 2.4 parser.
I am currently working on a project that uses Saxon, but we are attempting to migrate to the Xalan parser.
 
The project has been working fine with Saxon but as soon as we attempt to use Xalan instead we get a 
transform.TransformerConfigurationException. The exception is as follows:
 
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: 
javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException
at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:767)
 
There are a couple errors that follow, including some suspicious looking error:
 
Caused by: java.lang.ArrayIndexOutOfBoundsException
        at org.apache.xml.utils.BoolStack.peek(BoolStack.java:172)
        at org.apache.xalan.processor.StylesheetHandler.pushSpaceHandling(StylesheetHandler.java:1592)
        at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:650)
        at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:346)
        at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:167)
        at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:225)
 
Here is the snippet where the build fails.  The line marked with the * is the exact line numer:
 
Element root = transform.getDocumentElement();
 
  if ( root.getTagName().equals("xsl:stylesheet") )
      {
         *Transformer transformer = TransformerFactory.newInstance().newTransformer(new   
                                                                                   DOMSource(root/*transform*/));
         transformer.transform(new DOMSource(model), result);
      } 
 
The transform variable is of type org.w3c.dom.Document
 
Any help would be greatly appreciated.
 
Thanks in Advance 
 
Jason Silva



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread