TEIC / Stylesheets

TEI XSL Stylesheets
228 stars 124 forks source link

ODD to HTML: wrong links to datatypes within tabular content models #597

Open raffazizzi opened 1 year ago

raffazizzi commented 1 year ago

As noted by @lb42 (I was able to replicate it as well)

In the HTML generated from this source, links to datatypes (e.g. teidata.certainty) which appear within content models are broken: they appear as (eg) a link to “ref-teidata.certainty.html” rather than as links to “[oddIdent].html#teidata.certainty”. Look at the definition of teidata.probCert and compare the links within the content model and the declaration. Links to model classes appearing in a content model are broken in the same way, but they don’t appear to be links within the Declaration"

sydb commented 10 months ago

@raffazizzi (or maybe @lb42) — While I think I understand what you are pointing out here, it might be a lot easier if you supply an ODD that demonstrates the problem, no?

lb42 commented 10 months ago

This applies to any odd processed by the current roma. Try eg tei minimal and look at the default html doc generated for teidata.probcert. it doesnt apply to eg the current guidelines so its something to do with thebway roma generates html doc

raffazizzi commented 10 months ago

Just to avoid confusion, this isn't a Roma issue. Guidelines and generic HTML output are generated by different XSLTs. The culprit is the XSLT (XSLTs?) that generates HTML from ODD. ie. whatever process is called by /bin/teitohtml

lb42 commented 10 months ago

Well, yes and no. The HTML generated by oXygen for the same (or any) ODD exhibits a different version of the same problem -- it does not make any part of the "content" block into a clickable link. Which is better than generating links that don't work, I agree, but is still not the same as the version of this spec provided by the full Guidelines HTML (which, btw, include the ability to switch between XML and compact views for content models as an added bonus)

sydb commented 6 months ago

OK. Seems to me like we have two (possibly entirely) separate issues, here.

If I generate tei_minimal.html using commandline roma2.sh (i.e., run the equivalent of saxon -s:/path/to/tei_minimal.odd.compiled -xsl:/path/to/Stylesheets/odds/odd2html.xsl autoGlobal=false splitLevel=-1) I get an HTML document with an awful looking heading (author & title run together, author repeated, and author & date run together); no TOC; no section numbers; and whose first entry is for <body>.

If I generate tei_minimal.html using Stylesheets/bin/teitohtml --odd /path/to/tei_minimal.odd (i.e., Stylesheets/odds/odd2odd.xsl → Stylesheets/odds/odd2lite.xsl → Stylesheets/profiles/default/html/to.xsl, I think) I get an HTML document with a nice, if uninformative heading; a TOC; section numbmers; and whose first entry is for <TEI>.

I am not sure which of these two (or something different) is what you get from oXygen or Roma.

For the former (generated by roma2.sh):

For the latter (generated by teitohtml --odd):

Note [1] I think they are being generated by the called template "RefLinkAttributeValue" in html_params (line ~941). I have not chased who is calling it yet. [2] The only one I saw was a link to a datatype not included in the schema, and it was appropriately boldface, not a link, thus making me think it is doing the right thing. But that is far from certain.