You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Kip Lubliner <ki...@yahoo.com> on 2000/01/19 00:55:47 UTC
Building DOM objects directly , Xalan
I am trying to build DOM objects directly, without
reading from an XML file. When I call
anXSLProcessor.process(), I get an exception (stack
trace at end of email). I am using the LotusXSL apis,
BTW. Here is how I am building the Document:
Document d = new DocumentImpl();
Element listview = d.createElement("listview");
d.appendChild(listview);
// etc.
anXSLProcessor.process(
new XSLTInputSource(d),
new XSLTInputSource("c:\\stylesheet.xsl"),
out)
I couldn't find documentation on how to create the
DOMobjects. Should I be using DOMImplementationImpl?
XSL Error: SAX Exception
SAX exception: DTMLiaison can not handle nodes of
typeclass org.apache.xerces.dom.DocumentImplDTMLiaison
can not handle nodes of typeclass
org.apache.xerces.dom.DocumentImpl
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1412)
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1377)
at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:606)
at
com.lotus.xsl.XSLProcessor.process(XSLProcessor.java:227)
at [my code]
---------
DTMLiaison can not handle nodes of typeclass
org.apache.xerces.dom.DocumentImpl
at
org.apache.xalan.xpath.dtm.DTMLiaison.checkNode(DTMLiaison.java:136)
at
org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:303)
at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:582)
at
com.lotus.xsl.XSLProcessor.process(XSLProcessor.java:227)
at [my code]
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
Re: Building DOM objects directly , Xalan
Posted by Tilmann Singer <ra...@rosa.com>.
I think this has been answered on the xalan-dev list: you should
instantiate your processor this way
XSLTProcessor processor =
XSLTProcessorFactory.getProcessor(new
org.apache.xalan.xpath.xdom.XercesLiaison());
hope that helps, tilmann
Kip Lubliner wrote:
>
> I am trying to build DOM objects directly, without
> reading from an XML file. When I call
> anXSLProcessor.process(), I get an exception (stack
> trace at end of email). I am using the LotusXSL apis,
> BTW. Here is how I am building the Document:
>
> Document d = new DocumentImpl();
> Element listview = d.createElement("listview");
> d.appendChild(listview);
> // etc.
> anXSLProcessor.process(
> new XSLTInputSource(d),
> new XSLTInputSource("c:\\stylesheet.xsl"),
> out)
>
> I couldn't find documentation on how to create the
> DOMobjects. Should I be using DOMImplementationImpl?
>
> XSL Error: SAX Exception
>
> SAX exception: DTMLiaison can not handle nodes of
> typeclass org.apache.xerces.dom.DocumentImplDTMLiaison
> can not handle nodes of typeclass
> org.apache.xerces.dom.DocumentImpl
>
> at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1412)
>
> at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1377)
>
> at
> org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:606)
>
> at
> com.lotus.xsl.XSLProcessor.process(XSLProcessor.java:227)
>
> at [my code]
> ---------
>
> DTMLiaison can not handle nodes of typeclass
> org.apache.xerces.dom.DocumentImpl
>
> at
> org.apache.xalan.xpath.dtm.DTMLiaison.checkNode(DTMLiaison.java:136)
>
> at
> org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:303)
>
> at
> org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:582)
>
> at
> com.lotus.xsl.XSLProcessor.process(XSLProcessor.java:227)
>
> at [my code]
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com