Re: new draft of Zip/Unzip Note

On 6 August 2013 00:45, Alex Milowski <alex@milowski.com> wrote:
> 1. I wonder if it might be simpler to separate the creation of a zip archive
> from manipulating one.  I find I often have to fight with various tools that
> are trying to be too smart and "update" entries.  I end up having to write
> scripts that delete the previous version of the zip file to ensure that a
> new one is created from scratch.
>
> So, "creation" could be "p:zip" and "delete/modify" would be "p:modify-zip"
> (or whatever).

possibly … having p:zip and p:unzip was a compromise .. I would have
liked to have a single step rather then a bunch of steps.

> 2. What is the difference between p:zip w/ command=extract-manifest and
> p:unzip w/ manifest-only=true ?

none in terms of output, but there is a subtle difference in that
p:zip could generate manifest from non existing archive eg
p:directory-list … but yes the equiv was an explicit decision.

> 3. Does it make sense to separate the manifest from the input sequence ?
> That is:
>
>    <p:zip href="foo.zip"/>
>
>    creates a zip file of the sequence of documents from the input port
> source and the manifest port is empty.
>
>    <p:zip href="foo.zip">
>       <p:input port="manifest"> ...
>
>    uses the manifest to produce a zip including the sequence of documents
> from the input port source.
>
>    This would be easier for the step to distinguish zip metadata (manifests)
> from the content being processed.

unsure … i proposed conflating the two to get opinion from the WG.

my feeling is simpler the better, if you think adding an optional
manifest port would make things clearer then I can see where we can do
this w/o making impl overly complex.

> 4. If a sequence of documents is received on the input port with various
> base URIs, how are they converted into relative file names for the zip
> entries?  Don't you need some kind of base URI to construct a relative path?
> If you can't do so, is it an error?

I wanted to have a chance to discuss automatic zip uri heuristics at the WG …

and yes in general the zip/unzip doc is a bit rushed in terms of being
half baked but I think with yours and Vojtech's comments I can do a
re-edit before tomorrow meeting to see if we land in a better place.

J


>
>
>
> On Sun, Aug 4, 2013 at 9:55 AM, James Fuller <jim@webcomposite.com> wrote:
>>
>> Inspired by Norm's recent work,
>>
>> was able to get to a new draft for the zip/unzip steps
>>
>>    http://www.w3.org/XML/XProc/docs/xproc-zip_unzip.html
>>
>> Its rough around the edges but in a good place for discussion to start.
>>
>> Jim Fuller
>>
>
>
>
> --
> --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
> considered."
>
> Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 6 August 2013 06:39:28 UTC