medieval-mss
medieval-mss copied to clipboard
Format HTML - part 2
I keep having to go back and forth to add styles for different tags - especially if new ones are added in. It would be better if we fix some of these tags directly in HTML. This would save time on my end but also would avoid confusions. Also, if someone is using the page and can't load the CSS file (for whatever reason), then the HTML should be able to take over and still display the content in a meaningful.
On that note, the following tags needs changing:
-
if there is an HTML tag with a class
italic
, then it should be changed to an<i>
tag. -
if there is an HTML tag with a class
tei-italic
, then it should be changed to an<i>
tag. _//comment: I'm not sure what's the difference between these two though. -
if there is an HTML tag with a class
bold
, then it should be changed to an<b>
tag -
if there is an HTML tag with a class
super
, then it should be changed to an<sup>
tag. -
if there is an HTML tag with a class
tei-label italic
, then it should be wrapped inside a<i>
and<b>
tag. -
if there is an HTML tag with a class
tei-label
, then it should be changed to an<b>
tag -
if we have
<a>
tags, then there is no need to add additional tags in them. (i.e.<span>
). Unless those tags help with formatting.
A general note here is that if something is meant to be bold, then it should be wrapped inside a <b>
tag. On the other hand, if a text is meant to be italic, then it should be wrapped inside a <i>
tag. If it's both, italic and bold, then just use a combination of both tags - you get the idea.
These tags have not been deprecated in HTML5 so they will work as intended.
There may be other tags but I can't go through each page to check them. These were the important ones from what I've noticed.
The problem with this are the ones that come from @rend
attributes. That's a mechanism TEI provides for the cataloguer to specify styles. I've opened another issue (#130) about what to do with those.
hello everyone - where are we on this? The formatting in the catalogue records seems to be OK with the exception that in the collation sections superscript is not displaying correctly (as here: https://medieval.bodleian.ox.ac.uk/catalog/manuscript_10108)
Hello, just one quick observation: Among the field markers you use "Dimensions: (leaf|written):". The first colon seems to be superfluous or is it a habit in English?
thanks for pointing that out, @schassan - you're right, the first colon should not be there
I have fixed the double colon in dimensions labels (@schassan won't see it until the production server is re-indexed).
I have fixed the missing formatting of hi
elements by putting the logic removed from the CSS into the XSL, to output the relevant HTML tags (which requires translating space-separated lists in @rend
attributes into nested HTML elements.)
Only @rend
attributes on hi
elements are currently supported, and only a defined list:
- bold
- italic
- smallcaps
- roman
- superscript
- subscript
- underline
- overline
- strikethrough
Anything else is still valid, but will be ignored by the XSL. The list can be extended in the future, on request, as long as they are things web browsers can actually render. The trouble is that @rend
really is supposed to be about the source, not the display, so its uses are unlimited. In other catalogues, like Fihrist, it has been used for all kinds of things, the meaning or purpose of which has probably been forgotten.
Changing all use of class attributes to determine style would require a complete review of the entire XSL, which I do not have time to do at present.