https://issues.apache.org/bugzilla/show_bug.cgi?id=55383
--- Comment #5 from Konstantin Preißer <prei...@web.de> --- Created attachment 30735 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30735&action=edit Draft for improved HTML markup of Tomcat Docs Hi, as I did not receive negative comments, I tried to apply the new markup and style to the Tomcat Docs XSLT. :-) Attached is a patch that uses improved HTML markup and a new CSS stylesheet. Note that I did not work with XSL Transformation before, so I might have done strange things in the XSLT file - I would be glad if some XSLT expert could check that. ;-) While working in the XSLT file, I found some points on which I'm not clear (maybe someone can comment on these): 1) The xsl:stylesheet element specifies version="1.0"; however, I found that there's already version 3.0 of the XSLT spec [1] (a working draft), so I modified the version attribute to "3.0". Is this OK? 2) Some issues regarding HTML output: a) HTML5 specifies for the HTML syntax a recommended doctype of <!DOCTYPE html> For HTML generators that cannot output such a short doctype, it provides a Doctype Legacy String [2] as follows: <!DOCTYPE html SYSTEM "about:legacy-compat"> However, using the "doctype-system" attribute on the "xsl:output" element, I seem only be able to produce the longer (legacy-compat) doctype, but not the short one. In XHTML however, a doctype is not needed as there is no quirks mode. b) It seems that when using method="html", the generated .html files always contain the following meta element: <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> so I couldn't use the shorter form: <meta charset="UTF-8"> c) It seems that the library that produces the HTML output does not have a current view of the HTML5 void elements (such as <br>, <img> etc). For example, if I specify <wbr /> in the XSLT, then the generated HTML output will be <wbr></wbr>, although it should be only <wbr>, since this is a void element (specifying html-version="5.0" on the xsl:output element did not change that). Note that for XHTML, the XSLT could simply generate <wbr /> for void elements, as well as <div /> for empty non-void elements, as the browser would use a XML parser. This would avoid the need for the XSLT processor to know which elements are void elements. I think it could be worth looking at switching to XHTML sometime. However, in this case IE users would have to use at least IE 9, as that is the first IE to support XHTML. With the modified XSLT, the Doc index.html now validates when using the W3X Non-DTD based validator at http://validator.w3.org/nu/ as opposed to the previous markup which raised about 63 errors and 10 warnings. What do you think about it? [1] http://www.w3.org/TR/xslt-30/ [2] http://www.w3.org/TR/html51/syntax.html#the-doctype -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org