Hi Bob, thanks for the hint. If I read http://www.sagehill.net/docbookxsl/HtmlHead.html correctly it does not contain an example for accessing information from the document. But its good to know and I hope once I get more familiar with custom templates I will find out how to do it.
Thanks and best regards, Lars 2011/9/24 Bob Stayton <[email protected]> > ** > Hi Lars, > No, it would not require a customization per document, but if the URL value > is specific to each document, it would require the URL value to be either > present in the document for the stylesheet to access, or passed to the > stylesheet at run time using a stylesheet param. A custom template could > use either one to generate the link. > > Bob Stayton > Sagehill Enterprises > [email protected] > > > > ----- Original Message ----- > *From:* Lars Vogel <[email protected]> > *To:* Bob Stayton <[email protected]> > *Cc:* DocBook Apps <[email protected]> > *Sent:* Friday, September 23, 2011 2:32 PM > *Subject:* Re: [docbook-apps] How to specify rel="canonical in Docbook and > conversion for HTML > > Hi Bob, > > Thanks for your reply. > > As far as I know all major search engines (Yahoo, Google, Microsoft) > support this flag. > > I don't think customization would work (easily) as this rel="canonical" is > specific to every document (==Docbook file). If I understand it right this > would require a customization per document which would not be realistic for > me to maintain. > > Best regards, Lars > > 2011/9/23 Bob Stayton <[email protected]> > >> ** >> 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 >> [email protected] >> >> >> >> ----- Original Message ----- >> *From:* Lars Vogel <[email protected]> >> *To:* DocBook Apps <[email protected]> >> *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" /> >> >> 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 >> >> > > > -- > Lars > http://www.vogella.de - Eclipse, Android and Java Tutorials > http://www.twitter.com/vogella - Lars on Twitter > > -- Lars http://www.vogella.de - Eclipse, Android and Java Tutorials http://www.twitter.com/vogella - Lars on Twitter
