Page 1 of 1

Editor variables to target files in EPUB package

Posted: Fri Jul 10, 2020 5:16 pm
by HVV
Hi,

I have made a transformation scenario to alter the opf in an EPUB package. I would like the opf to be overwritten within the archive, but I can't seem to find the correct editor variables in the output settings of the transformation scenario. I've tried different things, like:

Code: Select all

${afd}/${cfne}
This saves the transformed opf outside of the archive in the same folder where the archive is. However, I would like to save it within the archive, so that the original opf is replaced by the transformed opf. Is this possible? And if so, are there editor variables for this?

Kind regards,

Hugo

Re: Editor variables to target files in EPUB package

Posted: Fri Jul 10, 2020 6:22 pm
by adrian
Hello,

It is simply not possible for the output of a transformation scenario to be stored anywhere else than in the local file system. Note that you can only specify paths (not URLs) in the "Save as" field of the scenario. There is no file path that can indicate a file from within an archive.
So, while you can use as input a URL that indicates a file from within an archive, you can't write it back to an archive as the output of a transformation scenario. You could use xsl:result-document/@href in the XSLT stylesheet to write it to a URI that indicates the file from within the archive.
Archive URIs that Oxygen supports look like this:

Code: Select all

zip:file:/C:/Users/user/path/to/archive.zip!/path/inside/archive/file.xml
You can copy the file URI of the file (Copy location) from the Archive Browser view.

Regards,
Adrian