User account creation filtered due to spam.

Bug 40653 - Issue with XML stream writer and namespaces
Summary: Issue with XML stream writer and namespaces
Alias: None
Product: classpath
Classification: Unclassified
Component: xml (show other bugs)
Version: 0.98
: P3 normal
Target Milestone: 0.99
Assignee: chris burdess
Depends on:
Reported: 2009-07-05 13:27 UTC by Ludovic Claude
Modified: 2010-10-12 17:31 UTC (History)
2 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:

TestCase (609 bytes, text/plain)
2009-07-05 13:29 UTC, Ludovic Claude
Patch for bug 40653 (208 bytes, patch)
2009-07-06 08:45 UTC, chris burdess
Details | Diff
Updated patch, passes my testcase (399 bytes, patch)
2009-07-06 17:08 UTC, Ludovic Claude
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ludovic Claude 2009-07-05 13:27:41 UTC
I have an issue with XMLStreamWriter. I have a test case which works perfectly with Sun 6 and Sun 5 + StAX reference implementation from, 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( illegal NCName: null
Comment 1 Ludovic Claude 2009-07-05 13:29:04 UTC
Created attachment 18139 [details]
Comment 2 chris burdess 2009-07-06 08:45:53 UTC
Created attachment 18141 [details]
Patch for bug 40653
Comment 3 chris burdess 2009-07-06 08:47:04 UTC
Please can you test with the supplied patch, if so I will submit it.
Comment 4 Ludovic Claude 2009-07-06 17:08:35 UTC
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
Comment 5 Andrew John Hughes 2009-07-07 11:53:02 UTC
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 :

Log message:
       2009-07-06  Ludovic Claude  <>

               PR xml/40653
               * gnu/xml/stream/
               Weaken testing of namespace prefix to match
               reference implementation and spec.

Comment 6 Andrew John Hughes 2010-10-12 17:31:59 UTC
Merged to gcj in libgcj-snapshot-20100921.