TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

Some incorrect relative paths to CSSs in the EPub transformation #312

Closed AlexJitianu closed 4 years ago

AlexJitianu commented 6 years ago

Hi,

I'm currently updating the TEI version bundled inside Oxygen XML Editor. While running our tests we discovered some bad paths inside xml\tei\stylesheet\epub\tei-to-epub.xsl ` ../css/tei.css</xsl:param>

../css/odd.css ../css/epub-print.css` These CSSs are not inside a "css" folder but exists directly in the "stylesheet" folder. When transforming, you get errors like: `Fatal error during transformation using D:\QA\oxygen\frameworks\tei\xml\tei\stylesheet\profiles\default\epub\to.xsl: Failed to read input file; SystemID: file:/D:/QA/oxygen/frameworks/tei/xml/tei/stylesheet/epub/tei-to-epub.xsl; Line#: 171; Column#: 23` Please let me know if there are other details that I can offer. Best regards, Alex
peterstadler commented 6 years ago

Hmm, I 'fixed' some path issues recently at d25fe11d497ceac19bdbb87476cc747c13f8fcb2 which seems to cause these troubles. So, how is this supposed to work? There is a css folder within the Stylesheets' root directory. This one I tried to address with the aforementioned changes to the files epub/tei-to-epub.xsl and epub3/tei-to-epub3.xsl. (Which works for me, btw. Both when calling profiles/default/epub/to.xsl and epub/tei-to-epub.xsl)

I'm puzzled right now …

AlexJitianu commented 6 years ago

Hi,

I think I understand what's happening. There is indeed a css folder insdie the Stylesheets' root directory but it doesn't get included inside the release: https://github.com/TEIC/Stylesheets/releases/download/v7.44.0/tei-xsl-7.44.0.zip

peterstadler commented 6 years ago

I see … In https://github.com/TEIC/Stylesheets/blob/c1b8f67fbbd350f1ffaa309c30e968796caacb15/Makefile#L73 the css files (from the css subfolder) get copied to the root of the distributable archive. Hence, we end up with different relative paths for these files when working with a checked out repository or with the released archive. I wonder what the rationale behind this was/is?

Overall, that seems to be a whole can of worms here, because e.g. tei_msdescription.css seems not to be included anywhere; teislides.css on the other hand is available twice, once at /slides/teislides.css and once more at /css/teislides.css with several differences between those files. So, what's the 'right' place for these files?