Re: [docbook-apps] How to specify rel="canonical in Docbook and conversion for HTML

From
Bob Stayton <>
Date
2011-09-23T21:22:54+00:00
ID
028501cc7a36$e6349490$6400a8c0@pazu
Thread
Re: [docbook-apps] How to specify rel="canonical in Docbook and conversion for HTML
Hi Lars,

The short answer is no, the stylesheets don't do 
anything with link rel="canonical".  The reference is to the Google 
webmaster site.  Is this feature specific to Google?

 

DocBook XSL does support customization of the 
<head> element by customizing the utility template named 
'user.head.content', as described here:

 

http://www.sagehill.net/docbookxsl/HtmlHead.html

 

That could be used to generate another <link> 
element.  I'm not sure where you would stash that canonical URL in your 
document, though.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Lars Vogel 

  
To: DocBook Apps 

  
Sent: Tuesday, September 20, 2011 12:14 
  AM

  
Subject: [docbook-apps] How to specify 
  rel="canonical in Docbook and conversion for HTML

  

Hi,
  

  
a while ago the big search engines introduce the rel="canonical 
  attribute in the header to identify the "main" content webpage, especially 
  useful if you have a chunks version and a single page version of your HTML 
  content.

  

  
This 
  is something which should go into the <head> section and may be 
  different per DocBook document. It would look like the following:

  

  
link rel="canonical" href=""http://www.example.com/product.php?item=swedish-fish">http://www.example.com/product.php?item=swedish-fish" 
  />

  

  

  
Details can be found here:

  

  
http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
  

  
Is this available in Docbook and considered by the XLST 
Stylesheets?

  

  
Best regards, Lars

  

-- 
Lars
http://www.vogella.de - Eclipse, Android and Java 
  Tutorials
http://www.twitter.com/vogella - Lars on 
  Twitter