← Prev in month ← Prev in thread

RFC: Split head.content template?

From
Thomas Schraitle <>
Date
2012-09-12T18:27:15+00:00
ID
3114061.NF0YfQi4B2@erde
Thread
RFC: Split head.content template?
Hi,

in {xhtml,html}/docbook.xsl there is the head.content template. The 
head.content does a lot of things: It creates a title, some CSS stylesheets 
references, and meta tags.

Unfortunately, customizing is a bit inconvenient: You have to copy *all* the 
content, although you just want to change the <style> element, for example. 
Same for meta information.

As this is one "central" piece when generating HTML, wouldn't it be more user 
friendly to split it into smaller pieces allowing easier customization? 

I've added a small patch which moves some elements into separate templates. 
That makes it a lot easier to customize just the necessary parts without 
touching head.content. I've named them header.content.<PURPOSE>:

 * head.content.base
   Creates <base href="{$html.base}"/>

 * head.content.link.made
   Creates <link rev="made" href="{$link.mailto.url}"/>

 * head.content.generator
   <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>

 * head.content.abstract
   Creates a <meta name="description"> tag and adds all the content from an
   abstract element

 * head.content.style
   Creates a <style type="text/css"> to support draft mode

The first three might be debatable as all three create just one element. The 
question is, is there are a need to customize, e.g., a <base/> element? Or to 
create a generator meta element directly?

Apart from the first three, the head.content.abstract and head.content.style 
templates are useful. People might want to customize what should go inside an 
meta description. Or change the content of <style> for the draft mode.


What do you think? Comments, suggestions, ideas? :-)

Thanks!


-- 
Gruß/Regards
  Thomas Schraitle
← Prev in month ← Prev in thread