W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2004

Re: Request for review: XOP

From: Robin Berjon <robin.berjon@expway.fr>
Date: Tue, 04 May 2004 11:47:01 +0200
Message-ID: <40976695.9080605@expway.fr>
To: noah_mendelsohn@us.ibm.com
Cc: www-dom@w3.org, XMLP Dist App <xml-dist-app@w3.org>

noah_mendelsohn@us.ibm.com wrote:
> Speaking for myself, the API's I would consider would in fact be general 
> to all of XML, but they would optimize particularly well when used with 
> XOP. The sort of thing I would have in mind would be along the lines of 
> 
>         // given a binary octet stream, create a text node consisting
>         // of the characters representing the xsd:base64Binary
>         // canonical lexical representation of that stream
>         Text t = createBase64TextfromBinaryStream(binStream);
> 
>         // inverse of the above, retrieves the stream
>         OctetStream recoveredStream = parseTextasBase64Binary(t);
> 
>         // the following is usable anytime after the creation
>         // of t.  In an optimized implementation, the
>         // character form won't actually be computed
>         // unless a method like this is called.
>         String base64 = t.data();
> 
> This would create a text node with the base64binary coding of the 
> corresponding stream.  I'm not a DOM expert, so excuse any errors of 
> detail.  Perhaps CharacterData would have been a better node type than 
> Text, I'm not sure. 

If you guys start doing some work on conversions between b64 and binary 
in the DOM, then it would be good to coordinate with SVG, where similar 
things are used:

   http://www.w3.org/TR/SVG12/#File-interface

Unifying the APIs would definitely be good here.

-- 
Robin Berjon
Received on Tuesday, 4 May 2004 05:47:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT