You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Claudio Sacerdoti Coen <sa...@students.cs.unibo.it> on 2000/07/27 10:48:13 UTC

xalan_1_2_D01 crashes

 Hi developers,

  I have just installed the 1_2_D01 versione of xalan and it crashes when
  the 1_1 version doesn't.

  The problem seems to me that you are using a wrong version of org.w3c.dom
   classes (or of xerces, perhaps).

  In src/org/apache/xalan/xpath/xdom/XercesLiason.java the code was:

=============
  /**
   * Get the parent of a node.
   */ 
  public Node getParentOfNode(Node node)
    throws RuntimeException
  {   
    return (Node.ATTRIBUTE_NODE == node.getNodeType())
           ? ((AttrImpl)node).getElement() : node.getParentNode();
  }
=============

  And now it is:

=============
  /**
   * Get the parent of a node.
   */
  public Node getParentOfNode(Node node)
    throws RuntimeException
  {
    return (Node.ATTRIBUTE_NODE == node.getNodeType())
           ? ((Attr)node).getOwnerElement() : node.getParentNode();
  }
=============

  but if I try to rebuild xalan I get this error:

=============
org/apache/xalan/xpath/xdom/XercesLiaison.java:396: Method getOwnerElement()
not found in interface org.w3c.dom.Attr.
           ? ((Attr)node).getOwnerElement() : node.getParentNode();
=============


  and in fact the dump of the exception stack is:

=======================
Exception in thread "main" java.lang.NoSuchMethodError: org.w3c.dom.Attr:
method getOwnerElement()Lorg/w3c/dom/Element; not found
        at
org.apache.xalan.xpath.xdom.XercesLiaison.getParentOfNode(XercesLiaison.java:395)
        at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getRoot(XMLParserLiaisonDefault.java:1411)
        at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getXLocatorFromNode(XMLParserLiaisonDefault.java:1994)
        at org.apache.xalan.xpath.XPath.getMatchScore(XPath.java:338)
        at org.apache.xalan.xslt.KeyTable.<init>(KeyTable.java:309)
        at
org.apache.xalan.xslt.Stylesheet.getNodeSetByKey(Stylesheet.java:1144)
        at
org.apache.xalan.xslt.Stylesheet.getNodeSetByKey(Stylesheet.java:1166)
        at
org.apache.xalan.xslt.XSLTEngineImpl.getNodeSetByKey(XSLTEngineImpl.java:2893)
        at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getNodeSetByKey(XMLParserLiaisonDefault.java:1726)
        at org.apache.xalan.xpath.FuncKey.execute(FuncKey.java:119)
        at org.apache.xalan.xpath.FuncLoader.execute(FuncLoader.java:108)
        at org.apache.xalan.xpath.Function.execute(Function.java:115)
        at org.apache.xalan.xpath.XPath.executeFunction(XPath.java:1271)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1380)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
        at org.apache.xalan.xslt.ElemChoose.execute(ElemChoose.java:118)
        at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:659)
        at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1195)
        at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java:958)
        at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
        at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:659)
        at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1195)
        at
org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateElement.java:1057)
        at
org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java:773)
        at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:428)
        at
org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java:321)
        at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1385)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
        at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java:894)
        at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
        at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:659)
        at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
        at
org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:443)
        at
org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:271)
        at xaland.main(xaland.java:70)
=======================

 I don't think you need the stylesheet and the XML file to fix the
 problem.

						Good work,
          					  C.S.C.

-- 
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
Undergraduate Computer Science Student at University of Bologna
E-mail: sacerdot@cs.unibo.it
http://caristudenti.cs.unibo.it/~sacerdot
----------------------------------------------------------------

Re: xalan_1_2_D01 crashes

Posted by Claudio Sacerdoti Coen <sa...@students.cs.unibo.it>.
 Please, ignore the previous message. I forgot I had also saxon in
 my CLASSPATH...

						Still sleeping,
						     C.S.C.

-- 
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
Undergraduate Computer Science Student at University of Bologna
E-mail: sacerdot@cs.unibo.it
http://caristudenti.cs.unibo.it/~sacerdot
----------------------------------------------------------------