projectLEMDO / lemdoIssues

Repository for LEMDO issue tracking and related documents.
MIT License
1 stars 0 forks source link

Reduce length of HTML attribute values #215

Open martindholmes opened 4 months ago

martindholmes commented 4 months ago

We currently use very long descriptive strings for @class and @id attributes, as well as carrying many TEI attribute values into the HTML as @data-* attributes when we probably don't need them. If we optimize here, we'll substantially reduce the page weight as well as the i/o burden during the build. There will be consequences for both lemdo-dev and downstream anthology CSS and JS, so changes will have to be made cautiously, one at a time.

martindholmes commented 4 months ago

In addition to doing this, we should note this comment in xhtml5_templates_tei_module.xsl:

MDH WARNING 2024-03-20: Future versions of vnu.jar will disallow the use of 
         capital letters in data-* attribute names, so instead of local-name() here we
         will have to use a function to regularize things like copyOf to data-copy-of. 
         I've written a function called hcmc:normDataAttName to do this, when there is 
         time to swap it in and fix the fallout.

and make sure all output attribute names are lower-case.