I have a pool of XSLTprocessors as well as XSLT stylesheets. My application
requires transformations on Node sometimes and sometimes on a string. While
creating the Processor pool if i use DTMLiaison i cannot transform nodes. If
i choose XercesLiaison i get exceptions while transforming Strings saying:
java.lang.NoSuchMethodError: org.w3c.dom.Attr: method
getOwnerElement()Lorg/w3c/
dom/Element; not found
at
org.apache.xalan.xpath.xdom.XercesLiaison.getParentOfNode(XercesLiais
on.java, Compiled Code)
at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getRoot(XMLParserL
iaisonDefault.java, Compiled Code)
at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getXLocatorFromNod
e(XMLParserLiaisonDefault.java, Compiled Code)
at org.apache.xalan.xpath.XPath.locationPath(XPath.java:959)
at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
at org.apache.xalan.xpath.XPath.equals(XPath.java:586)
at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
at org.apache.xalan.xpath.XPath.predicate(XPath.java:981)
at
org.apache.xalan.xpath.SimpleNodeLocator.predicates(SimpleNodeLocator
.java, Compiled Code)
at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java,
Compiled Code)
at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java,
Compiled Code)
at
org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocat
or.java:321)
at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
at org.apache.xalan.xslt.ElemChoose.execute(ElemChoose.java,
Compiled Co
de)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
at
org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:
140)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplate
Element.java:1199)
at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(E
lemTemplateElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.j
ava:176)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at
org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.jav
a, Compiled Code)
at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplat
eElement.java, Compiled Code)
at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java,
Com
piled Code)
at
org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:295)
at
com.classwell.content.util.Transformer.getTransformedXml(Transformer.
java, Compiled Code)
Why do i get this exception? Can i set the XMLParser Liaison before actually
calling process method of XSLTProcessor. Like..calling DTMliaison while
transforming Strings and XercesLiaison while transforming nodes.
Thanks,
kusuma