Summary: | Issue with XML stream writer and namespaces | ||
---|---|---|---|
Product: | classpath | Reporter: | Ludovic Claude <ludovic.claude> |
Component: | xml | Assignee: | chris burdess <dog> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bug-classpath, gnu_andrew |
Priority: | P3 | ||
Version: | 0.98 | ||
Target Milestone: | 0.99 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: |
TestCase
Patch for bug 40653 Updated patch, passes my testcase |
Created attachment 18139 [details]
TestCase
Created attachment 18141 [details] Patch for bug 40653 Please can you test with the supplied patch, if so I will submit it. Created attachment 18142 [details]
Updated patch, passes my testcase
Hi Chris, I have created an updated patch which fixes this bug. There may be more issues with the XML Stream, in particular support for the XML stream 1.0.1 API is missing
CVSROOT: /sources/classpath Module name: classpath Changes by: Andrew John Hughes <gnu_andrew> 09/07/07 11:52:15 Modified files: . : ChangeLog gnu/xml/stream : XMLStreamWriterImpl.java Log message: 2009-07-06 Ludovic Claude <ludovic.claude@laposte.net> PR xml/40653 * gnu/xml/stream/XMLStreamWriterImpl.java: Weaken testing of namespace prefix to match reference implementation and spec. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9770&r2=1.9771 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/stream/XMLStreamWriterImpl.java?cvsroot=classpath&r1=1.6&r2=1.7 Merged to gcj in libgcj-snapshot-20100921. |
I have an issue with XMLStreamWriter. I have a test case which works perfectly with Sun 6 and Sun 5 + StAX reference implementation from stax.codehaus.org, but it fails on GNU Classpath. The issue is that the validation seems too strong for the namespace, and it doesn't like writeNamespace() with a null prefix argument, although the documentation says: > Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace This is the result of running my test: 1) testWriter(gnu.xml.stream.XMLStreamWriterTest)java.lang.IllegalArgumentException: illegal NCName: null at gnu.xml.stream.XMLStreamWriterImpl.writeNamespace(libgcj.so.90) at gnu.xml.stream.XMLStreamWriterTest.testWriter(XMLStreamWriterTest.java:26) at gnu.xml.stream.XMLStreamWriterTest.main(XMLStreamWriterTest.java:37)