Fw: [kaffe] CVS kaffe (jim): A small JAXP fix (which took me hours to chase down). Fixes XSLT on JSTL.
Jim Pick
jim@kaffe.org
Wed Aug 27 14:21:02 2003
Hi GNU-JAXP developers,
Here's a small patch I applied against the GNU-JAXP classes in Kaffe.
Without it, the XSLT support in JSTL doesn't work.
Cheers,
- Jim
Begin forwarded message:
Date: Wed, 27 Aug 2003 14:14:21 -0700
From: "Kaffe CVS" <cvs-commits@kaffe.org>
To: kaffe@kaffe.org
Subject: [kaffe] CVS kaffe (jim): A small JAXP fix (which took me hours to chase down). Fixes XSLT on JSTL.
PatchSet 3990
Date: 2003/08/27 21:12:06
Author: jim
Branch: HEAD
Tag: (none)
Log:
A small JAXP fix (which took me hours to chase down). Fixes XSLT on JSTL.
Here's some code which differed on Kaffe and the JDK, before this patch:
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.sax.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
public class TraxInput {
public static void main(String[] args)
throws SAXException {
StringReader stringReader = new StringReader("Test");
XMLReader xr = XMLReaderFactory.createXMLReader(
"org.apache.xerces.parsers.SAXParser");
InputSource s = new InputSource(stringReader);
System.out.println("s: " + s);
Source saxSource = new SAXSource(xr, s);
InputSource isource = SAXSource.sourceToInputSource(saxSource);
System.out.println("isource:" + isource);
}
}
Members:
ChangeLog:1.1586->1.1587
libraries/javalib/javax/xml/transform/sax/SAXSource.java:1.1->1.2
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1586 kaffe/ChangeLog:1.1587
--- kaffe/ChangeLog:1.1586 Wed Aug 27 20:07:23 2003
+++ kaffe/ChangeLog Wed Aug 27 21:12:06 2003
@@ -1,3 +1,9 @@
+2003-08-27 Jim Pick <jim@kaffe.org>
+
+ * libraries/javalib/javax/xml/transform/sax/SAXSource.java:
+ Handle case where sourceToInputSource() is called with an
+ existing SAXSource.
+
2003-08-27 Helmer Kraemer <hkraemer@freenet.de>
* kaffe/kaffe/main.c:
Index: kaffe/libraries/javalib/javax/xml/transform/sax/SAXSource.java
diff -u kaffe/libraries/javalib/javax/xml/transform/sax/SAXSource.java:1.1 kaffe/libraries/javalib/javax/xml/transform/sax/SAXSource.java:1.2
--- kaffe/libraries/javalib/javax/xml/transform/sax/SAXSource.java:1.1 Mon Dec 2 15:02:25 2002
+++ kaffe/libraries/javalib/javax/xml/transform/sax/SAXSource.java Wed Aug 27 21:12:08 2003
@@ -1,5 +1,5 @@
/*
- * $Id: SAXSource.java,v 1.1 2002/12/02 15:02:25 dalibor Exp $
+ * $Id: SAXSource.java,v 1.2 2003/08/27 21:12:08 jim Exp $
* Copyright (C) 2001 Andrew Selkirk
* Copyright (C) 2001 David Brownell
*
@@ -122,6 +122,10 @@
{
InputSource retval;
boolean ok = false;
+
+ if (in instanceof SAXSource) {
+ return ((SAXSource) in).inputSource;
+ }
if (in.getSystemId () != null) {
retval = new InputSource (in.getSystemId ());
_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe