RE: Zip/Unzip - the Minimalist Version for EPUB

> > - Can p:zip-extract handle non-XML files? If so, how would that work?
> > (I assume the user would have to tell p:zip-extract the media type of
> > the entry or something like that.)
> 
> It could act the same as the p:http-request step and output c:data somehow.
> I would prefer to leave that as implementation defined until we solidify our
> story about non-XML content.

I think the best would be to follow the same story that we have for p:data - that is, adding optional 'content-type' and 'wrapper' options and saying something like:

"
Exactly how the data is encoded depends on the media type of the ZIP entry. If the user specified a content-type, then that content type should be assumed. If no content type was specified, the inferred content type is implementation-dependent.

- If the media type of the ZIP entry is an XML media type or text type with a charset parameter that is a Unicode character encoding (per [Unicode TR#17]) or is recognized as a non-XML media type whose contents are encoded as a sequence of Unicode characters (e.g. it has a charset parameter or the definition of the media type is such that it requires Unicode), the data must be encoded as Unicode character sequence.

- If the media type is not an appropriate text type, or if the processor does not recognize the media type, the content is base64-encoded.

The resulting data is wrapped in an element with the name specified in the wrapper option (or c:data if no wrapper is specified).
"

Regards,
Vojtech

Received on Friday, 6 June 2014 11:50:42 UTC