TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

Multiple file extensions are a bad idea #543

Closed martindholmes closed 4 months ago

martindholmes commented 2 years ago

This ticket is a fresh take on one aspect of what was originally raised in #201: standard Stylesheet ODD processing creates outputs with multiple extensions (file.odd.dtd, file.odd.relaxng), which is pernicious because, for one thing, on Windows, which hides the actual extension by default, it will appear that file.odd.dtd is actually file.odd. We believe the .odd component should be dropped, and at the same time, the .relaxng extension should be standardized to .rng.

Note that these extra extensions do not occur in the Oxygen framework, so they're not only bad but also inconsistent.

martindholmes commented 2 years ago

The other ticket, relating to the /out/ folder in Oxygen, is here:

https://github.com/TEIC/oxygen-tei/issues/53

martindholmes commented 2 years ago

With @HelenaSabel, @sydb, @npcole: We believe the problem arises at lines 212 and 215 of bin/transformtei: the $from variable contains the string "tei" rather than the extension "odd", so the .odd extension is left in place. We think a good approach to this might be a sed or awk command which strips off any of a set of expected extensions (.xml., .odd, .tei etc.) before adding the output extension.

martindholmes commented 2 years ago

Stylesheets group believes that we should create teitorng and oddtorng (which should do the same thing), but leave teitorelaxng, making it instead just generate a warning that people should use oddtorng instead.

sydb commented 1 year ago

Mostly done with this (in branch sydb_543_file_exts), but the plan outlined above does run into problems.

sydb commented 11 months ago

Group meeting of 2023-09-28 decides on 2 questions I posed on 2022-09-10:

sydb commented 9 months ago

This can be closed, EXCEPT that I just discovered a) a dependency in the TEI repo, and in trying to fix that, b) Stylesheets/profiles/tei/relaxng/ should now be called profiles/tei/rng/. Fixed, I hope. (@raffazizzi is testing.)

hcayless commented 5 months ago

Can I just say that killing off teitorelaxng without any warning or deprecation period (apparently against Martin's recommendation) was really obnoxious and has broken at least one workflow I manage, maybe more. May I suggest putting it back? The warning is fine, breaking it is not.

raffazizzi commented 4 months ago

Council at the VF2F extends their apologies, @hcayless, but at this point we don't think it wise to roll this back. We could and should have handled this differently and your complaint is duly noted for the future.

If I can help you with migration please let me know.