Re Binary data in XML

Terry Allen (tallen@sonic.net)
Fri, 17 Oct 1997 15:05:50 -0700


Mike Sample writes:
| Is there a standard way to include binary data directly within an
| XML/RDF document? Or must one use indirection or ad-hoc encoding such
| as:
|
| <foo href="http://somewhere.com/the_data.bla"/>
|
| or
| <foo enc="hex">A103EF92B7</foo>

Not a standard, but you might consider

ftp://ds.internic.net/internet-drafts/draft-masinter-url-data-03.txt

which expires tomorrow. I don't know whether the author expects to
update it. It defines a data URL like

data:[<mediatype>][;base64],<data>

in which the payload is encoded in base64 and the mediatype is a MIME
type. It's SGML/XML-safe.

Regards,

Regards,

Terry Allen Electronic Publishing Consultant tallen[at]sonic.net
http://www.sonic.net/~tallen/
Davenport and DocBook: http://www.ora.com/davenport/index.html
at CNgroup: terry.allen[at]cngroup.com