W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > January 2007

Data Encoding Vocabulary

From: Alex Milowski <alex@milowski.org>
Date: Wed, 31 Jan 2007 09:30:58 -0800
Message-ID: <28d56ece0701310930y432535bdkbacef36215d9cf35@mail.gmail.com>
To: public-xml-processing-model-wg@w3.org
I think it would be very useful in the following cases to have a vocabulary
element that we can use to encode non-XML data:

   * when the result of an XSLT transform is 'html', 'text' or some non-XML
     media type.
   * to allow image data to be passed within a pipeline
   * to support encrypted data.

We could a simple element in a namespace of our choosing like:

<c:data type="mime-type">data...</c:data>

The rules would be:

   * any 'text/*' mime type would be allowed to be embedded as escaped
     text children.
  * all other mime types must be base64 encoded data.

The base64 encoding is consistent with XMLSchema's base64Binary
simple type.

For example, if a transformation has 'text' as its output method, the
encoding would be:

<c:data type="text/plain">
class foo { .... }

Similarly, you could produce a binary from a step by using:

<c:data type="image/jpeg">...base64...</c:data>

The nice thing about this is we can re-use this solution for allowing the
full range of results from XSLT as well as encryption and other
steps results that might required the "root" of the result to be non-XML.

--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language

Bertrand Russell in a footnote of Principles of Mathematics
Received on Wednesday, 31 January 2007 17:31:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:41 UTC