https://issues.apache.org/bugzilla/show_bug.cgi?id=55383
Konstantin Preißer <prei...@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30735|0 |1 is obsolete| | --- Comment #6 from Konstantin Preißer <prei...@web.de> --- Created attachment 30739 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30739&action=edit Updated patch for improving HTML markup & style in Tomcat docs I updated the patch with minor improvements (e.g. replace tabs with spaces, added AL2 to the new CSS file, further improvements of XSLT contents). I also changed the JavaScript for the Comments section to annotate XSLT-generated strings to the <script> element using the new HTML5 data-* attributes [1] instead of inserting text directly in JavaScript string literals, as that would cause problems if the string data contains special characters. Furthermore, I added the Tomcat image as normal <img> with a link, instead of using it as background-image. Note that I had to create a new .png image from tomcat.svg as the previous image was .gif and therefore did not contain alpha transparency. The patch doesn't contain the image "tomcat-new.png" as it is binary data - is it possible to include such files in a SVN patch? (In reply to Konstantin Preißer from comment #5) > 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. The XSLT and XQuery Serialization 3.0 spec says at point 7.4.6 [2]: > If the value of the requested HTML version is 5.0, the doctype-public and > doctype-system serialization parameters are both absent, the first element > node child of the document node that is to be serialized is to be serialized > as an HTML element, the local part of the QName of which is equal to the > string HTML, without regard to case, and any text node that precedes that > element node in document contain only whitespace characters, then the HTML > output method MUST output a document type declaration, with no public or > system identifier. That should account for the new HTML5 doctype. However, it seems that the XSLT serialization library used when building Tomcat with Ant does not yet implement this, as it doesn't output a Doctype when setting html-version="5.0". > 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). At point 7.1 of the spec [3], it says: > For HTML5, the void elements are area, base, br, col, command, embed, hr, > img, input, keygen, link, meta, param, source, track and wbr. So just like the above point, the XSLT serializer probably doesn't yet implement this. (In reply to Konstantin Preißer from comment #3) > This has the advantages over using <table> that > - the CSS "table" will not exceed the given width if it has elements that > are wider (e.g. a <pre> with long lines of unwrappable text) than the > "table" (this should consider the concerns in bug 16579). To correct me: A table will not exceed the given width when using "table-layout: fixed" style. This is also true for <table> elements. [1] http://www.w3.org/TR/html51/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes [2] http://www.w3.org/TR/xslt-xquery-serialization-30/#HTML_DOCTYPE [3] http://www.w3.org/TR/xslt-xquery-serialization-30/#HTML_MARKUP -- 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