dev@fi.java.net

Re: JAXB and Namespaces

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 15 Jun 2005 17:56:56 +0200

Kohsuke Kawaguchi wrote:
> Paul Sandoz wrote:
>
>> :-) yet it is really confusing.
>>
>> An example:
>>
>> <a xmlns:xml="http://...." xml:lang="en"/>
>> ^
>> |
>> Will this ever get written out
>> when 'a' and 'xml:lang' are bound by
>> JAXB?
>>
>> I do not think it will, or i suppose it is up to the serialization
>> implementation to make sure it does not.
>
>
> Right. It shouldn't declare the xmlns:xml namespace (I think it's
> illegal to use [Xx][Mm][Ll].* as a prefix)
>

OK. IRRC it is OK to declare the "xml" namespace but nothing else i.e.
no "xml" prefix with a different URI and no "xml" URI with another prefix.


> But it sounds like a very likely bug in the JAXB RI...
>

We do not know yet :-)

There are defintely some bugs (well missing features really) with
respect to the Encoder class because it does not support full UTF-8
encoding of all possible code points (especially high and low
surrogates). It may be best to use NIO here or we can copy the code from
FI which i optimized specifically for UTF-8, i can fix this if you want.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109