W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2011

cx:zip issue...

From: Nic Gibson <nicg@corbas.net>
Date: Thu, 7 Jul 2011 17:15:33 +0100
Message-Id: <C04D9FE7-3389-4345-A7D3-AA3ACDE116D7@corbas.net>
To: XProc Dev <xproc-dev@w3.org>
Hi all

I'm fairly certain I've done something obviously stupid that I'm overlooking here so feel free to poke me and tell me...

I'm experimenting with the cx:zip step to create epub files.  As a simple first step, I'm trying to create an epub file with just the stored mimetype file and nothing else. I've got the following xproc (ng-library.xpl is just a subset of Norm's library-1.0.xpl):

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
    xmlns:cx="http://xmlcalabash.com/ns/extensions"
    xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">

    <p:input port="source"/>
    <p:output port="result"/>
    
    <p:option name='epub-file' required="true"/>

    <p:import href="../libs/ng-library.xpl"/>
    
    <cx:zip>
        <p:input port="source">
            <p:inline xml:base="/epub-root/mimetype">
                <doc>application/epub+zip</doc>
            </p:inline>
        </p:input>
        <p:input port="manifest">
            <p:inline>
            <c:zip-manifest xml:base="/epub-root/">
                <c:entry href="mimetype" name="mimetype" compression-method="stored"/>
            </c:zip-manifest>
            </p:inline>
        </p:input>
        
        <p:with-option name="command" select="'create'"/>
        <p:with-option name="href" select="$epub-file"/>
        
    </cx:zip>

</p:declare-step>

When I run this I get the following output:

nicg@newt:~/Projects/penguin/epub-xproc/% calabash tests/text-store.xpl epub-file=test.epub
Jul 7, 2011 5:10:49 PM com.xmlcalabash.util.DefaultXProcMessageListener info
INFO: Running pipeline !1
Jul 7, 2011 5:10:49 PM com.xmlcalabash.util.DefaultXProcMessageListener info
INFO: Running {http://xmlcalabash.com/ns/extensions}zip !1.5
Jul 7, 2011 5:10:49 PM com.xmlcalabash.util.DefaultXProcMessageListener error
SEVERE: XE0001:XProc error err:XE0001
Jul 7, 2011 5:10:49 PM com.xmlcalabash.drivers.Main error
SEVERE: Unknown error
Jul 7, 2011 5:10:49 PM com.xmlcalabash.drivers.Main error
SEVERE: Underlying exception: java.io.FileNotFoundException: /Volumes/data/Projects/penguin/epub-xproc/test.epub (No such file or directory)
nicg@newt:~/Projects/penguin/epub-xproc/% 


So... what dumb thing am I doing wrong here?

cheers

nic
--
Nic Gibson
Corbas Consulting
Digital Publishing Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817	
	
Received on Thursday, 7 July 2011 16:16:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 7 July 2011 16:16:18 GMT