You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Juergen Dufner <du...@pi3.informatik.uni-mannheim.de> on 2000/08/16 18:49:07 UTC

XercesLiaison can not handle nodes of type

Hello,

I got an

XSL Error: SAX Exception
org.apache.xalan.xslt.XSLProcessorException: XercesLiaison can not handle
nodes of type class de.unimannheim.pi3.natix.dom.Document

I'm implementing a DOM for a Database. The XML document is stored in the
database and you can access to the document using my DOM implementation.
My DOM implementation implements the DOM from org.w3c.dom
	
I want to give xalan the XMLInput as org.w3c.dom.Document, an XSLInput as
file (stylesheet.xml) and want to receive the HTML output in a file
(output.html).

I changed the XSLTProcessor like described in documentation:

      XSLTInputSource xmlSource = new XSLTInputSource(doc);
      XSLTProcessor processor = XSLTProcessorFactory.getProcessor
	(new org.apache.xalan.xpath.xdom.XercesLiaison());
      org.apache.xalan.xslt.XSLTInputSource xslSheet = 
	new org.apache.xalan.xslt.XSLTInputSource (xslFile);
      org.apache.xalan.xslt.XSLTResultTarget xmlResult = 
	new org.apache.xalan.xslt.XSLTResultTarget (htmlFile);      
      // Perform the transformation.
      processor.process(xmlSource, xslSheet, xmlResult);

Any ideas?

J�rgen Dufner
WWW: http://www.jdufner.de/


Re: XercesLiaison can not handle nodes of type

Posted by Juergen Dufner <du...@pi3.informatik.uni-mannheim.de>.
Does it mean, that Xalan doesn't supply the org.w3c.dom or that the
classes addtionally implements XercesLiasion?

J�rgen Dufner
WWW: http://www.jdufner.de/


Re: XercesLiaison can not handle nodes of type

Posted by Gary L Peskin <ga...@firstech.com>.
Juergen --

XercesLiaison is a class in Xalan that provides an interface to Xerces. 
XercesLiaison extends XMLParserLiaisonDefault which provides the default
support to an XML Parser.  Your DOM implementation functions like an XML
parser as far as Xalan is concerned.  See if you can use
XMLParserLiaisonDefault in place of XercesLiaison.  Otherwise, you'll
have to create your own liaison class by extending one of these
Xalan-supplied classes.

HTH,
Gary

Juergen Dufner wrote:
> 
> Hello,
> 
> I got an
> 
> XSL Error: SAX Exception
> org.apache.xalan.xslt.XSLProcessorException: XercesLiaison can not handle
> nodes of type class de.unimannheim.pi3.natix.dom.Document
> 
> I'm implementing a DOM for a Database. The XML document is stored in the
> database and you can access to the document using my DOM implementation.
> My DOM implementation implements the DOM from org.w3c.dom
> 
> I want to give xalan the XMLInput as org.w3c.dom.Document, an XSLInput as
> file (stylesheet.xml) and want to receive the HTML output in a file
> (output.html).
> 
> I changed the XSLTProcessor like described in documentation:
> 
>       XSLTInputSource xmlSource = new XSLTInputSource(doc);
>       XSLTProcessor processor = XSLTProcessorFactory.getProcessor
>         (new org.apache.xalan.xpath.xdom.XercesLiaison());
>       org.apache.xalan.xslt.XSLTInputSource xslSheet =
>         new org.apache.xalan.xslt.XSLTInputSource (xslFile);
>       org.apache.xalan.xslt.XSLTResultTarget xmlResult =
>         new org.apache.xalan.xslt.XSLTResultTarget (htmlFile);
>       // Perform the transformation.
>       processor.process(xmlSource, xslSheet, xmlResult);
> 
> Any ideas?
> 
> Jürgen Dufner
> WWW: http://www.jdufner.de/

validating multiple documents with a single schema

Posted by Jack Lincoln <ja...@ricochet.net>.
I'm trying to validate many documents with a single schema..
Is there some way to preserve that schema between parses rather than
reloading it with every parse?

I've looked at XMLValidator and it gets reset when you reset the
DOMParser...

Is there some strategy that I can employ here?

thanks,

jack

Jack Lincoln
mPower Advisors L.L.C.

1355 Sansome Street
San Francisco CA 94111
(415) 875-8840 direct
(415) 875-8821 fax
jack.lincoln@mpower.com