Stylesheets icon indicating copy to clipboard operation
Stylesheets copied to clipboard

HTML documentation generated from ODD is horribly invalid

Open martindholmes opened this issue 7 years ago • 2 comments

The HTML5 documentation produced from an ODD file is full of errors. This, for example, is the validator's response to the TEI Lite documentation in the current release:

https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.tei-c.org%2Frelease%2Fdoc%2Ftei-p5-exemplars%2Fhtml%2Ftei_lite.doc.html

I think there are two possible approaches to fixing this: one is to view the current output as an interim processing step, and add another transformation after it which fixes things; the other is to dive into the HTML5 output templates and fix the problems at source. Issues such as self-closed empty <ul> tags can easily be fixed by the former approach, but where we end up with a <div> nested inside a <ul>, it's difficult to see how a post-processor could fix it.

The first thing we need to do, in any case, is fix that obsolete doctype declaration. I believe that could be done in html5/html5.xsl, odds/odd2html.xsl, and slides/teihtml-slides.xsl.

martindholmes avatar Mar 02 '18 18:03 martindholmes

I think we should now collapse all our html output stuff into html5, and stop maintaining a distinction; html5 is the present and the future. Having done that, we can remove stuff like type="text/javascript" (which generates warnings in html5 validation), and we can invoke the vnu validator to check our output in a more straightforward way.

martindholmes avatar Feb 08 '21 18:02 martindholmes

I am wondering if we can connect ODD-to-HTML tickets into a "meta-issue" to tackle... ?

ebeshero avatar Aug 15 '25 00:08 ebeshero