Hi,

On Tue, 2004-12-07 at 01:58, Kaffe CVS wrote:
> 2004-12-06  Dalibor Topic  <[EMAIL PROTECTED]>
> 
>         * libraries/javalib/javax/xml/transform/TransformerFactory.java:
>         Use gnu.xml.transform.TransformerFactoryImpl as the default
>         transformer instead of libxmlj one.
> 
>         Reported by: Benja Fallenstein <[EMAIL PROTECTED]>

This is what Chris (CCed) recommends. But unfortunately we now need to
start over with trying to get writing out dom trees to streams working
again (most of my fixes were for the GnomeDocumentBuilder. With this you
will hit something like the following:

gnu.xml.dom.DomEx: The node belongs in another document.
Node Name: #document
   at gnu.xml.dom.DomNode.checkMisc (DomNode.java:334)
   at gnu.xml.dom.DomNode.appendChild (DomNode.java:551)
   at gnu.xml.dom.DomDocument.appendChild (DomDocument.java:324)
   at gnu.xml.transform.TransformerImpl.transform (TransformerImpl.java:205)
   at org.eclipse.ui.XMLMemento.save (XMLMemento.java:413)

Trying to work around this you will at least have to deal with the
Writer problem yet again. Sigh. Patch attached.

After that I am currently stuck unfortunately.
Will try to debug some more tonight.

Cheers,

Mark
Index: libraries/javalib/gnu/xml/transform/TransformerImpl.java
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/javalib/gnu/xml/transform/TransformerImpl.java,v
retrieving revision 1.3
diff -u -r1.3 TransformerImpl.java
--- libraries/javalib/gnu/xml/transform/TransformerImpl.java	4 Dec 2004 21:12:30 -0000	1.3
+++ libraries/javalib/gnu/xml/transform/TransformerImpl.java	7 Dec 2004 06:55:22 -0000
@@ -43,6 +43,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
+import java.io.Writer;
 import java.net.MalformedURLException;
 import java.net.UnknownServiceException;
 import java.net.URL;
@@ -74,9 +75,11 @@
 import org.xml.sax.ext.LexicalHandler;
 import gnu.xml.dom.DomDoctype;
 import gnu.xml.dom.DomDocument;
+import gnu.xml.dom.ls.WriterOutputStream;
 import gnu.xml.xpath.Expr;
 import gnu.xml.xpath.Root;
 
+
 /**
  * The transformation process for a given stylesheet.
  *
@@ -410,6 +413,12 @@
         out = sr.getOutputStream();
         if (out == null)
           {
+	    Writer w = sr.getWriter();
+	    if (w != null)
+	      out = new WriterOutputStream(w);
+	  }
+	if (out == null)
+	  {
             String systemId = sr.getSystemId();
             try
               {

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to