Re: Request for review: XOP

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 UTC