This filter zips or unzip a zip package as defined by the Java zip API.
Creating a ZIP package.
The filter reacts to the following XML fragment:
<zip
name="{name of the package}"
xmlns="http://www.xmlpipe.org/xpe/zip"
>
<dir
name="top"
>
<entry
name="embeddedxml"
>
<test>
XML fragment can be zipped directly.
</test>
</entry>
<dir
name="second"
>
<entry
name="{a name assigned to the entry}"
href="{uri to the resource to be zipped}"
/>
</dir>
</dir>
</zip>
Note:
- The top level is the zip element.
- @name,optional, this is the name of the package. If not specified, a random name will be assigned.
- A zip element can have one or more dir elements or entry elements.
- A dir element can have one or more dir elements or entry elements.
- An entry element can refer to a resoure using its href attribute.
- An entry element can also embed an XML fragment inside it.
The filter changes the above XML fragment into the following:
<zip:zip
output="{uri to the output zip file}"
xmlns:zip="http://www.xmlpipe.org/xpe/zip"
/>