DocBook Stylesheets 2.0.3 released
Another snapshot of the continuing improvements to the XSLT 2.0 stylesheets for DocBook.
Yesterday, I quietly published the 2.0.3 release of the DocBook XSLT 2.0 stylesheets.
The big change in this release is the move towards HTML5. The
stylesheets now produce article
elements for major units,
section
elements for sections, figure
elements,
etc. In order to retain compatibility with older browsers, I've
updated the CSS and JavaScript. I'm employing a customized version of
Modernizr for backwards
compatibility.
I've updated the stylesheets used for this weblog to the latest release and flushed all the cached HTML, so those changes appear here now as well. If you see any weirdness, please report it.
Other changes worth noting: table columns now have a class attribute for
better CSS access and tables of contents are always (and only) produced with
ul
’s. The alternative presentation with dl
produced invalid
markup because there were never any dd
s.
The other changes are summarized in the release notes:
-
Converted a number of div elements into more semantic HTML5 elements (
article
,section
, etc.). -
Fixed
lineannotation
formatting. -
Added localization template for annotation titles. Fixed bugs in annotation support.
-
Added a
default.table.column.widths
parameter to allow a user to suppress default column widths when none are specified in the DocBook (CALS) table. In an effort to make it easier to control table style with CSS, added a “tcol
” class to each table column.n
-
Added support for plugins (and other mechanisms) to load localization data in MarkLogic server.
-
Fiddled with nesting of divs in chunks to better support CSS styling of the footer.
-
Greatly improved chunking performance.
-
Fixed bug where sections would sometimes be labelled even if they didn't appear in
autolabel.elements
. -
Removed massive
i18n.xml
andi18ndata.xsl
files; dynamically load individual locales when needed. -
Removed
about:legacy-compat
doctype as it borks XML parsers. -
Fixed
link
processing. -
Rearranged the way chunks are handled so that the whole document is available for cross references even when only the selected chunk (
rootid
) is processed -
Changed condition for title foil slides to accomodate new content model in slides:
(foil|foilgroup)+
. -
Always use
ul
for tables of contents,dl
s without anydd
are not valid in HTML5 -
Treat HTML table caption as title for the purposes of cross references.
Share and enjoy!
Comments
It'd be interesting to see a couple of sample documents published using the old stylesheets and the new release just to compare the markup.
Good point. See this gist.
Are the website stylesheets getting to 'production' standard yet Norm? Thinking of moving the docbook faq over to them?
I'm using them in production. For what it's worth.
Hi there,
I was having a problem transforming documents(I tried two) using SaxonHE9-4-0-2J:
I fixed it by changing line 58 of xlink.xsl:
From there it worked fine.
I noticed that the problem isn't there for saxonhe9-2-1-5j
Having HTML5 is just great, hope this helps
Hi there,
I was having a problem transforming documents(I tried two) using SaxonHE9-4-0-2J:
I fixed it by changing line 58 of xlink.xsl:
From there it worked fine.
I noticed that the problem isn't there for saxonhe9-2-1-5j
Having HTML5 is just great, hope this helps
Hi,
Thanks for the error report; could you please open an issue at github and include a sample document that demonstrates the problem.
I think you're right, but I'd like to have a document for the test suite.
I just found out that the problem comes from itemized lists wrapped in paragraphs...
https://github.com/docbook/xslt20-stylesheets/issues/6
I didn't find a way to attach a file to the issue, sorry for the big paste.
Thanks. I'll take a look asap.
Hi Norm
The goals and features you have outlined for v2 are very much in line with where we (and out clients) would like to go (particularly HTML5 and CSS). However the last release was over a year ago.
Any advice would be appreciated.
Hi Norm, I understand that you use the stylesheets for producing the V5 Definitive Guide. I think there is a bug with the transformation of formalpara, since the title is not present in the Output of the Example.
I have compared with the 4.5 Version, and there is the title followed by the content, as expected.
Sincerely, Frank Steimke
Hi,
I just like to try your xslt 2 but I get serval errors, like "Cannot read image properties (No extension)" at the HTML output or at FO output