On Fri, Feb 29, 2008 at 9:55 AM, Christian Floerkemeier
<[EMAIL PROTECTED]> wrote:
>
>  I agree, but escaping via &#0; etc is not an option to my knowledge. Control
>  characters are illegal in XML, regardless of encoding.
>

Yikes... did some research based on your comment and I agree. Seems
that the XML folks want to be nice to the C programmers too. OK, then
in that case I think we need to do one of:

a) Ban null from utf8's in LTK
b) When they appear (which is, hopefully never), escape the entire
utf8 as a hex string or base64. We could put an attribute on the
element in the LTK-XML instance to indicate that we are representing
the string as xs:hexBinary.
c) CDATA as you propose.

CDATA has its own problems and complexities. If we don't do (a) I
think I would prefer a simple hex encoding in the rare case that a
NULL appears since the XML parser will work with it just fine.

<rp:ReaderFirmwareVersion
binencode="hex">332E302E312E323400</rp:ReaderFirmwareVersion>

The default encoding is raw utf-8.

So is it OK in XML to escape all other control characters with the
&#xx; ? That seemed to be what I understood from my googling.

-- John.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel

Reply via email to