[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe)
From: |
Ito Kazumitsu |
Subject: |
Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe) |
Date: |
Fri, 6 Dec 2002 14:24:06 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/20.7 (i386-*-windows98.2222) MULE/4.1 (AOI) Meadow/1.14 (AWSAKA:62) |
In message "Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe)"
on 02/12/06, Ito Kazumitsu <address@hidden> writes:
> > Ito, did it work for you?
>
> No, I got the same unexpected result.
I modified my test program so that it uses gnu.xml.aelfred2.JAXPFactory,
and run it with JDK 1.4. Then I got a satisfactory result.
Isn't there anything around javax.xml.parsers.* ?
When run with JDK 1.4:
bash$ CLASSPATH=. java TestSAX2 file:attribute.xsl
ELEMENT
URI = http://www.w3.org/1999/XSL/Transform
local = stylesheet
qname = xsl:stylesheet
ATTRIBUTES
URI =
local = version
qname = version
When run with kaffe:
$ kaffe TestSAX2 file:attribute.xsl
ELEMENT
URI = http://www.w3.org/1999/XSL/Transform
local = stylesheet
qname = xsl:stylesheet
ATTRIBUTES
URI =
local =
qname = xmlns:xsl
URI =
local = version
qname = version
Test program and data
bash$ cat TestSAX2.java
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import gnu.xml.aelfred2.JAXPFactory;
public class TestSAX2 {
public static void main(String[] args) throws Exception {
String uri = args[0];
new TestSAX2(uri);
}
public TestSAX2(String uri) throws Exception {
SAXParserFactory factory = JAXPFactory.newInstance();
factory.setFeature("http://xml.org/sax/features/namespaces", true);
factory.setFeature("http://xml.org/sax/features/namespace-prefixes",
false);
XMLReader xr = factory.newSAXParser().getXMLReader();
xr.setContentHandler(new MyHandler());
xr.parse(uri);
}
private class MyHandler extends DefaultHandler {
public void startElement(
String nsURI,
String localName,
String qName,
Attributes atts
) {
System.out.println("ELEMENT");
System.out.println(" URI = " + nsURI);
System.out.println(" local = " + localName);
System.out.println(" qname = " + qName);
System.out.println("ATTRIBUTES");
for (int a=0; a<atts.getLength(); a++) {
System.out.println(" URI = " + atts.getURI(a));
System.out.println(" local = " + atts.getLocalName(a));
System.out.println(" qname = " + atts.getQName(a));
}
}
}
}
bash$ cat attribute.xsl
<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
</xsl:stylesheet>
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/03
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Dalibor Topic, 2002/12/04
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), David Brownell, 2002/12/05
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Dalibor Topic, 2002/12/05
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/05
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe),
Ito Kazumitsu <=
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/06
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/06
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/06
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/06
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), Ito Kazumitsu, 2002/12/06
- Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe), David Brownell, 2002/12/06