TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

epub transformation fails (in OxGarage) due to missing file "epub-print.css" #555

Open peterstadler opened 2 years ago

peterstadler commented 2 years ago

As reported on TEI-L, OxGarage fails to transform TEI -> ePub. The OxGarage error message is clear:

Error at char 23 in xsl:for-each/@select on line 222 column 86 of tei-to-epub.xsl:
FOUT1170: Failed to read input file: /usr/share/xml/tei/stylesheet/css/epub-print.css (No
such file or directory)

I thought this was already fixed by #394 but apparently only for epub3?! So I think a simple fix would be to have the relative links at https://github.com/TEIC/Stylesheets/blob/b8db468c31eed9ca19bf2df0e457521663debf75/epub/tei-to-epub.xsl#L57-L59 point at (absolute) URLs.

For the record see also #412, but IMHO that should not stop us from applying the proposed "hack".

HelenaSabel commented 2 years ago

I added the “needs discussion” tag, because I have some vague recollection about discussing whether we should maintain other epub formats besides epub3. I will add this to the agenda of our next meeting.

peterstadler commented 1 year ago

For the idea of deprecating epub in favor of epub3 see #576

martindholmes commented 1 year ago

This bug is also present in the Oxygen plugin.

martindholmes commented 1 year ago

I think we should remove the Makefile action that copies all the CSS into a different location, and then see what breaks; then we should fix those transformations so that they look in the correct location for the CSS files.

peterstadler commented 1 year ago

The Makefile target that copies the CSS files is common: https://github.com/TEIC/Stylesheets/blob/c89f3c76a3fb0a97c72d9c05a8b3f059d65a3f28/Makefile#L71-L74

common is a dependency of the release target: https://github.com/TEIC/Stylesheets/blob/c89f3c76a3fb0a97c72d9c05a8b3f059d65a3f28/Makefile#L127

So, if we removed (or changed) the "copying of the CSS files" in the common target, we will get a different directory structure of the release artifact and finally of the deployed version at https://tei-c.org/release/xml/tei/stylesheet/ and within the Vault.

If we really needed to change anything here (see the idea of deprecating epub2 #576), my preferred approach would be to change the directory structure of the Stylesheets repo not the release.