forked from transpect/unzip-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunzip-example.xpl
28 lines (22 loc) · 1.03 KB
/
unzip-example.xpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:tr="http://transpect.io"
version="1.0">
<p:output port="result" primary="true">
<p:documentation>/c:files/c:file</p:documentation>
<p:pipe port="result" step="unzip"/>
</p:output>
<p:serialization port="result" omit-xml-declaration="false" indent="true"/>
<p:output port="list-with-directories">
<p:documentation>/c:files/c:directory/c:file</p:documentation>
<p:pipe port="list-with-directories" step="unzip"/>
</p:output>
<p:serialization port="list-with-directories" omit-xml-declaration="false" indent="true"/>
<p:option name="zip" required="true"/>
<p:option name="path" required="true"/>
<p:import href="unzip-declaration.xpl"/>
<tr:unzip name="unzip">
<p:with-option name="zip" select="$zip"/>
<p:with-option name="dest-dir" select="$path"/>
<p:with-option name="overwrite" select="'yes'"/>
</tr:unzip>
</p:declare-step>