Re: [xsl] Zipping xsl:result-documents into ePub

Subject: Re: [xsl] Zipping xsl:result-documents into ePub
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Tue, 25 Aug 2009 17:13:37 +0000 (GMT)
Martynas Jusevicius wrote:

> Thanks Florent, EXPath worked like a charm!
Thanks, good to hear :-)

> Maybe you have an example on reading OpenDocument
(at least
> .odt), so that I could drop ODFToolkit and have my whole ODF >
>
ePub workflow as XSLT? :)

  Yes.  ODF files (OpenDocument Format, ODT is a
special case,
for text documents) are regular ZIP files.  You can thus use the
ZIP module functions as for any other ZIP file.  In particular,
the following
functions allow you to extract entries from the
file:
zip:xml-entry($href, $entry) as document-node()
    zip:html-entry($href,
$entry) as document-node()
    zip:text-entry($href, $entry) as xs:string
zip:binary-entry($href, $entry) as xs:base64Binary

and the following to list
the content of the ZIP file (aka its
structure):

    zip:entries($href) as
element(zip:file)

  If you are interested in this module, you can have a look
at
the presentation I gave at Balisage 10 days ago.  You will find
links in
the "EXPath resources" section on the webpage
http://www.expath.org/resources.html, for the paper, the
presentation itself,
and a few simple but complete examples I
showed there.

  If you have any
question, or if you run into bugs, please use
the mailing list (the Google
group.)  I would be interested to
see how you use the ZIP module in this case
(ODF -> EPUB) if the
project is public.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/

Current Thread