[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Unexpected HTML output using customization of HTMLDocBook styles heet
> From: Beth Fischi <bfischi@broadjump.com> > > Could someone help me spot what I'm doing wrong? I'm using the following > stylesheet, which imports the html\docbook.xsl stylesheet for DocBook, but > the resulting HTML file displays with Futura Book but no other formatting. > Did I somehow override the html\docbook.xsl formatting by including this > template where & how I did? > > When I just use the html\docbook.xsl stylesheet, the resulting HTML file > looks okay (i.e., has a basic table structure with Times font face), except > for the tricky cells split into double rows ("morerows"), which don't > display properly -- they get shifted over into third and fourth columns. Any > help would be greatly appreciated. > > **********XSL FILE********************* > <?xml version="1.0"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version='1.0' > xmlns="http://www.w3.org/TR/xhtml1/strict" > exclude-result-prefixes="#default"> > > <xsl:import href="docbook.xsl"/> > > <!-- Apply Futura face formatting to entry text. --> > <xsl:template match="entry"> > <FONT FACE="Futura Book" SIZE="-1"> > <xsl:apply-templates/> > </FONT> > </xsl:template> > > </xsl:stylesheet> The basic problem is that you have superceded a more complex template with your simple template. The Docbook XSL file "html/table.xsl" defines templates for <entry> using: <xsl:template match="thead/row/entry"> and these go on to handle the various attributes, output the HTML <TD> tags, and perform various other table cell processing. The precedent rules for templates say that a more specific template has greater precedence than a more general template. Since your template is an exact match for <entry>, it wins. Your new template for "entry" doesn't add to the former processing of <entry>, it replaces it. So you get no <TD> markup and only Futura. Offhand, I don't see an easy way to add your customization to the Docbook XSL table processing (someone else might, though). I would instead go for a CSS stylesheet for the HTML <TD> element rather than the <FONT> tag. bobs
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC