xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: org.apache.xmlrpc.XmlWriter emits invalid XML
Date Tue, 20 Aug 2002 16:50:18 GMT
Adam Megacz <adam@megacz.com> writes:

> > > These characters are not allowed even if they are encoded as &#XXXX;
> > > The only correct behaviour is to refuse to handle data containing these
> > > characters.
> 
> > So rather than entity encoding the characters, an XmlRpcException of
> > some sort should be thrown?
> 
> Ah, the joys of the self-contradictory XML-RPC spec ;) 
> 
>   "<string> [is an] ASCII string"
> 
>   "Any characters are allowed in a string except < and &... A string can
>    be used to encode binary data."
> 
> Dave absolutely refuses to fix or clarify this.
> 
> Personally, I would advocate John's approach, combined with support
> for the <unicode> element from the XMC draft:
> 
>    http://www.xwt.org/xmc/draft-megacz-xmc-06.txt
> 
> If the other end can't understand <unicode>, it will fault. Non-ASCII
> characters aren't allowed under XML-RPC, so a fault is the desired
> behavior -- there is no way to send non-ASCII characters within the
> bounds of the spec without using the <unicode> element.
> 
> I can write up a patch for this if you like.

Thanks for the offer.  I went ahead and just changed the code to throw
an XmlRpcException (it's really annoying that that is a checked
exception, btw, grrr).
-- 

Daniel Rall <dlr@finemaltcoding.com>

Mime
View raw message