[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: binary base64 definition
- From: Danny Vint <email@example.com>
- To: Jerry Johns <Jjohns@computerlogic.com>,'Ian Graham' <firstname.lastname@example.org>
- Date: Sat, 06 Jan 2001 13:28:21 -0800
Notations and other formats have always been application dependant since
SGML days. In that arena we were primarily trying to use graphics and
usually just display them. So the SGML editors provided a mechanism to map
a tool to a format. Seems like you might be able to do something with OLE
on windows for the same sort of functionality. I'm not sure what was being
conveyed about the DOM support, but it would seem like there would be a way
to hook into knowing what the NOTATION type was (base64 in this case) and
launching some other application to deal with it.
Maybe if you describe what the actually need for the base64 is we might be
able to offer suggestions along other lines.
At 03:31 PM 1/6/2001 -0500, Jerry Johns wrote:
>What if I ditched DOM and used another tool for managing the XML file; could
>I then insert the base64 content and still be within the XML standards? Is
>this a limitate of DOM? Thanks. Jerry
>From: Ian Graham [mailto:email@example.com]
>Sent: Saturday, January 06, 2001 10:50 AM
>To: Dan Vint
>Cc: Jerry Johns; 'firstname.lastname@example.org'
>Subject: Re: binary base64 definition
>The DOM supports access to notation nodes, but can enforce no statement
>aobut the proper encoding of a referenced external entity (which makes
>sense, as it is external to the document).
>Base64 encoding of content inside a document would require custom code for
>doing the encoding/decoding, and some attribute-based mechanism for
>labeling the 'type' content of the node containing the data. That is
>certainly possible, but as far as I can see is outside the scope of the
>On Fri, 5 Jan 2001, Dan Vint wrote:
>> You can't use elements this way, but an alternative would be to create a
>> NOTATION type and then an external entity of this type - you would copy
>> the contents of whatever should be base 64 into this external file, it
>> would be part of the XML document but it would be outside. Not sure if
>> DOM has been setup to understand NOTATIONS, but in an SGML world you would
>> be able to associcate a "processor" with that notation and have it called
>> whenever you needed to read or write that format.
>> Your DTD might look like the following:
>> <!DOCTYPE .... [
>> <!NOTATION base64 SYSTEM "binary base64">
>> <!ENTITY extfile1 SYSTEM "extfile.b64" NOTATION "base64" >
>> The syntax is probably not exact but you can look up the details.
>> > In the DTD, can I specify a type of "binary base64" for an element so
>> > when I write to the XML file using DOM, DOM will automatically encode
>> > binary data for me without parsing for control characters? If so, I
>> > it will do the reverse when I read that element.
>> > Can anyone validate my assumption about the DTD data type? Has anyone
>> > an example DTD definition with this in it?
>> > Thanks much.
>> > Jerry
Author: "SGML at Work"