[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with datasection
- From: email@example.com (Henry S. Thompson)
- To: Tim Bray <firstname.lastname@example.org>
- Date: Tue, 12 Jun 2001 13:26:24 +0100
Tim Bray <email@example.com> writes:
> At 07:18 PM 11/06/01 -0400, Steve Rowe wrote:
> >Sounds like you need to convert the binary data which you're
> >attempting to store in a CDATA section into a form which will be XML
> >compliant. The standard solution for this problem is Base64 encoding.
> If it's base64, you don't need to use a CDATA section; one of
> the nice things about base64 is it doesn't use < or > or & -
> [/+a-zA-Z0-9] if I recall correctly. Furthermore, base64 is
> smart about whitespace, so you can even make it look pretty.
> Works very nicely indeed with XML, if it didn't exist we would
> have had to invent it.
> <someBinaryGibberish encoding="base64">
> I'm sure there are some xsd: attributes you could use to say
> in a standardized way that this is base64, but <blush> I don't
> know it. XSD gureaux?
[the namespace decls can/should of course be higher up if you have
more than one of these blobs in a document]
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: firstname.lastname@example.org