[publican-list] Adding divs before and after the book content

Michele Baldessari michele at acksyn.org
Tue Nov 18 07:44:29 UTC 2014


Hi Jeff,

On Mon, Nov 17, 2014 at 10:44:23AM +1000, Jeff Fearn wrote:
> On 11/17/2014 06:54 AM, Michele Baldessari wrote:
> > so after a bit of work, I managed to add headers and footers and tweak the css in my brand [1] so that things look more or less like I'd like them to.
> > 
> > The last thing I'd need to do to get the output fitting with the website, is to place any html content between a few <div class='foo'> </div> tags. I cannot add "<div class='foo'>" to my header.html and "</div>" to
> > the footer.html, because xslt will complain that the there is a tag mismatch.
> > 
> > Right now I work around this with some scipts adding the divs on the created html output. What would be the proper clean way to achieve this? Is there an example brand around doing this (I've failed to find any so
> > far)
> 
> You need to override chunk-element-content for html and process.root for html-single, then you can wrap the calls to header and footer with your div.

Ah perfect, thanks. I got it to work with this ;)

> Also you should beware of your xsl:imports, e.g. your html.xsl files has:
> 
> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
> 
> This is the file for FOP output and probably won't work with the publican common XSL which uses:
> 
> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>

Ah ok. While I started from the clusterlabs brand, I also checked and
the fedora brand has the same import in html.xsl:
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
<xsl:import href="../../../xsl/html.xsl"/>

Is it a bug there as well, or is that brand doing something differently?

Thanks a lot and regards,
Michele
-- 
Michele Baldessari            <michele at acksyn.org>
C2A5 9DA3 9961 4FFB E01B  D0BC DDD4 DCCB 7515 5C6D




More information about the publican-list mailing list