OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: BASE64 (was Re: CDATA)

[ Lists Home | Date Index | Thread Index ]


It isn't invented by SVGMaker, even not by SVG specification.
That is "Data URL scheme" was difined in http://www.ietf.org/rfc/rfc2397.txt
as long ago as 1998.

But only some user-agents currenty implement it, unfortunately.

Check this in some html page with Mozilla :)
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8
GO2jAAAA4UlEQVR4nO2VvQ2DMBCFn6PswASewLPY2yD2sDeA3hR01GYDFmAKUlxkkUgkd5IpovgV
yEj3/Pl+DGrfd1yp26W7V8B/AO5SQwhhmiYAfd9z4pX0HiilaME0ykrknBPFPw/ClLUWAD35Rm5c
jBGAMSZXpjDAGJM3JYC1lmNk9cA5tyyL955eCVasB1R0Ks4xmzIZjOM4DAOAlJLg1Ad9uWht29Ii
j39JgNZ6Xdc8l1nzPG/bxiWc1a7rOryW/q0HH7xHnQY1TQMgxngJgPxnc0LJMQHij51Uv//DqYAK
qADgAdKOZKU6j84RAAAAAElFTkSuQmCC"
alt="character A" width="32" height="32" />

P.S. Now reading you blog at http://www.seairth.com too :) 

Nikolai Rassadin
nick@xjtek.com

-----Original Message-----
From: Suresh Babu Koya [mailto:skoya@quark.co.in] 
Sent: Thursday, April 03, 2003 10:16 AM
To: xml-dev@lists.xml.org

Has anyone seen SVGMaker. It uses BASE64 encoding to encode binary data and
XLink to resolve this binary data. This looks like a nice way to handle
Binary data in XML.

<image id="image0005" width="100%" height="100%" preserveAspectRatio="none"
xlink:href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAABIAAAARCAYAAADQWvz5AAAAh0lEQVR4nNWTwQrD
MAxDn/bjdb/87dKwtkuXFMZgAl9io8hSEpVZJFFNr/eYZhlgmiiJImvSX0EdVlGH
EyjPM/nkUbIKIMt7j3UTsmSoCBDwrGhfBapzq0EJXE5AjUn2PtFR1i75WvzTippn
ta148G+UWg8tyZeQidSu/eLeO7qD3/+1/yN6AqKDQ3pfgS9WAAAAAElFTkSuQmCC"/>

-----Original Message-----
From: Seairth Jacobs [mailto:seairth@seairth.com]
Sent: Thursday, April 03, 2003 12:19 AM
To: xml-dev
Subject: BASE64 (was Re: CDATA)


I still don't see why a <![BASE64[ ]]> isn't added.

1) Nothing needs escaping.

2) The encoded form falls neatly into all content encoding forms (I think),
so parsers don't have to switch between "character" and "octet" hats.

3) When someone asks "how do I handle binary?", the answer would be a flat
"<![BASE64[ ]]>" instead of "Well, can do this... or this... or this... and
you are responsible to all encoding/decoding".  I suspect much less
grumbling will occur.

4) For anyone arguing that it causes bloat: why are you using XML in the
first place then?

5) It's a clean, simple, and well-used technique.

6) It's about as 80/20 a solution as I can think of.

So why not add it?

---
Seairth Jacobs
seairth@seairth.com







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS