This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Errors when trying to use Xalan instead of Saxon


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]