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

2011-09-23 Thread Lars Vogel
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 

> **
> 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
> b...@sagehill.net
>
>
>
> - Original Message -
> *From:* Lars Vogel 
> *To:* Bob Stayton 
> *Cc:* DocBook Apps 
> *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 
>
>> **
>> 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  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  element.  I'm not sure where
>> you would stash that canonical URL in your document, though.
>>
>> Bob Stayton
>> Sagehill Enterprises
>> b...@sagehill.net
>>
>>
>>
>> - 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  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


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

2011-09-23 Thread Bob Stayton
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
b...@sagehill.net


  - Original Message - 
  From: Lars Vogel 
  To: Bob Stayton 
  Cc: DocBook Apps 
  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 

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  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  element.  I'm not sure where 
you would stash that canonical URL in your document, though.

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


  - 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  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


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

2011-09-23 Thread Lars Vogel
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 

> **
> 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  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  element.  I'm not sure where
> you would stash that canonical URL in your document, though.
>
> Bob Stayton
> Sagehill Enterprises
> b...@sagehill.net
>
>
>
> - 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  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


Re: [docbook-apps] Draft mode: Missing image error affects all PDF builds

2011-09-23 Thread Bob Stayton
Which XSL-FO processor are you using?  I'm guessing those error messages are coming 
from the XSL-FO processor and not the XSL stylesheet.


Setting draft.mode to anything but 'no' causes the stylesheet to load into the XSL-FO 
file the extra page-masters that are needed for displaying the draft watermark image 
in the background.  If there are no draft instances, those page-masters are never 
used, so there should not be such an error reported.  I believe it was FOP that 
checked for the existence of the image when the XSL-FO file is parsed, not when the 
image is used.  I consider that to be a bug in the XSL-FO processor, not the 
stylesheet.  Other processors don't report it.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - 
From: "mike 675" 

To: 
Sent: Tuesday, September 20, 2011 8:04 AM
Subject: [docbook-apps] Draft mode: Missing image error affects all PDF builds




Using the watermark feature for draft docs:
My book has a  status="draft" attribute.

In my PDF customization layer I enter the following parameters:

maybe
../images/draft.png

Problem: Error messages about missing draft.png are now generated when I
export *any* book to PDF, regardless of whether a status attribute is set on
the book.

This is obviously caused by the graphic not being available in a common
folder accessible to all.
But I think this is a bug. The errors should not be generated if draft mode
has not been turned on in the source XML, by using status="draft".

--
View this message in context: 
http://old.nabble.com/Draft-mode%3A-Missing-image-error-affects-all-PDF-builds-tp32501074p32501074.html

Sent from the docbook apps mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



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

2011-09-23 Thread Bob Stayton
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  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  element.  I'm not sure where you 
would stash that canonical URL in your document, though.

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


  - 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  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


Re: [docbook-apps] collab elements: not present in FO

2011-09-23 Thread Bob Stayton

Hi Mike,
When you run the FO process, the error output should have shown something like 
this:

"Element collabname in namespace '' encountered in collab, but no template 
matches."

The error should also have shown up in red on the title page because it seems the FO 
stylesheet does not have a template matching on collabname, and that is a bug.  It 
would be nice if you could report that bug to the DocBook   SourceForge bug tracker.


When you say collab is ignored, I'm wondering if you are working with a customization 
that does something with collab or collabname.  Have you tested it with the stock 
stylesheets?


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - 
From: "mike 675" 

To: 
Sent: Tuesday, September 20, 2011 6:14 AM
Subject: Re: [docbook-apps] collab elements: not present in FO




Using an alternative markup.
HTML output is OK.
Only  is present in FO.  entries are ignored.


 AndyAndrews
  
   Peter Piper
  
 
   Jenny Jones
 
   


mike 675 wrote:


Using 1.76.1 stylesheets, exporting to FO.

The  elements in the following markup do not show up in the .fo
file.




  
Andy
Andrews
  


  
Jenny James
  


  
Mike Michaels
  





--
View this message in context: 
http://old.nabble.com/collab-elements%3A-not-present-in-FO-tp32471247p32501067.html

Sent from the docbook apps mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: re: [docbook-apps] Accessibility: adding scope attribute to HTML output

2011-09-23 Thread Bob Stayton

Hi Mike,
It seems that the para element is an exception for using that mode because it also has 
the feature of passing along a role attribute as a class attribute.  If the para in 
question has a role attribute (of any value) and the $para.propagates.style is set to 
1 (the default), then your template will work. The mode is not used otherwise.  I 
think this is a bit of inconsistent behavior that should be looked at more closely by 
the developers.  Could you please file a bug report on the SourceForge site to get 
this straightened out?


The entry element has the same story, since it also has an $entry.propagates.style 
attribute.


It did work for match="section" when I tried it, adding the width attribute to the 
section's div element in the output.


BTW, this line in your template does nothing useful.

   

It creates a template parameter but never uses it. Setting width to a value of 
"section" is not a valid value.  I think you modeled it on the class param where a 
value of "section" does make sense as a default.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - 
From: "mike 675" 

To: 
Sent: Wednesday, September 21, 2011 1:28 AM
Subject: Re: re: [docbook-apps] Accessibility: adding scope attribute to HTML 
output




I can't seem to get this working consistently.

I would expect the following customization to change all  elements to
 in the HTML output.
But it has no effect.


 
50px
   

Neither does using "section" as the match.
Nor informaltable/tgroup/thead/row/entry, which is one of the elements I
want to change.
However, if I match for "itemizedlist", 50px turns up in the  HTML
element.

Is it OK to use a simple xpath, such as "section" for matching elements?


Robert Nagle wrote:


1. Yes, all you have to do is add it to your customization layer. You
will need to replace caption/para with an xpath statement that
corresponds to the table  element(s) you want to customize. (and
remember if you are not  using the vanilla docbook xsl but  the
namespace xsl (i.e., docbook-ns), you will need to preface everything
with d: in the xpath statement. So caption/para would be
d:caption/d:para ).

2.  For my example at
http://lists.oasis-open.org/archives/docbook-apps/201108/msg00091.html
, my source code  would say  either:

  Hello  

Or

  Hello  

Your output after you applied the transformation would be (I think)


Hello 

I gave two examples. In one example I made the assumption that you
would hardcode the values of width in the  XSL customization layer --
so you wouldn't need to put it in the xml source code. In the other
example, I assumed that you would grab the values from the role
attribute in the  element in source.

However, if the value of the  scope attribute is always going to be
"col", I don't see any reason why you couldn't hard code it in the XSL
customization layer. others may disagree about this.

--
-- Forwarded message --
From: mike 675 
To: docbook-apps@lists.oasis-open.org
Date: Mon, 19 Sep 2011 01:58:03 -0700 (PDT)
Subject: [docbook-apps] Accessibility: adding scope attribute to HTML
output

To meet accessibility requirements, we need to add the scope attribute to
the
HTML output for our tables.

Our tables are marked up in DocBook XML, CALS style.

Every  needs to be 

The first  in a  needs to be 

Any ideas on where to start on this.
I guess I need to cusomize the html/table.xsl stylesheet.




Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5581
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
http://www.robertnagle.info

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org





--
View this message in context: 
http://old.nabble.com/Accessibility%3A-adding-scope-attribute-to-HTML-output-tp32493408p32503723.html

Sent from the docbook apps mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] add newline to generated text?

2011-09-23 Thread Bob Stayton
Hi Jason,
No, there is nothing you can put in the text attribute value that will generate 
a new line that shows up in your displayed output.  Inserting a 
 will 
insert a new line in the output file, but in neither HTML nor XSL-FO is such a 
line break character formatted as a line break.  Instead, it is treated as just 
a bit of white space to be collapsed into a single space when lines are laid 
out in the display.

If you want to do this for XSL-FO  output, my book has a section that describes 
a stylesheet customization to get the label (DocBook's term for the chapter 
number part) on a separate line from the title.  You can view it online for 
free at:

http://www.sagehill.net/docbookxsl/TitleFontSizes.html#ChapterTitles

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


  - Original Message - 
  From: Jason Zech 
  To: docbook-apps@lists.oasis-open.org 
  Sent: Friday, September 23, 2011 12:50 PM
  Subject: [docbook-apps] add newline to generated text?


  Hi all,

   

  I am trying to customize the chapter title output. I'm going from DB5 to 
single-file HTML (and later to epub) using the ns version of 1.76. 

   

  I've got a customization working on the generated text of the chapter title, 
but I'd like to generate a newline between the chapter number and the chapter 
title. 

   

  Here is the customization I have. 

   


http://docbook.sourceforge.net/xmlns/l10n/1.0";>
  

  

  


   

  I need something between %n and %t but I'm beginning to think I can't use any 
of kind of newline here. Is it possible?

   

  Thanks in advance.

   

  Jz

   

   

  Jason Zech | Project Manager, Digital Workflow | New Product Development 
  [ph] 773-281-1818 x212   [fax] 773-281-4129 | z...@loyolapress.com

  LoyolaPress. | A Jesuit Ministry 
  3441 N. Ashland Ave. | Chicago, IL 60657 | www.loyolapress.com 
  Join our online community of advisors: www.SpiritedTalk.org

   


[docbook-apps] add newline to generated text?

2011-09-23 Thread Jason Zech
Hi all,

I am trying to customize the chapter title output. I'm going from DB5 to 
single-file HTML (and later to epub) using the ns version of 1.76.

I've got a customization working on the generated text of the chapter title, 
but I'd like to generate a newline between the chapter number and the chapter 
title.

Here is the customization I have.

  
  http://docbook.sourceforge.net/xmlns/l10n/1.0";>

  

  

  

I need something between %n and %t but I'm beginning to think I can't use any 
of kind of newline here. Is it possible?

Thanks in advance.

Jz


Jason Zech | Project Manager, Digital Workflow | New Product Development
[ph] 773-281-1818 x212   [fax] 773-281-4129 | 
z...@loyolapress.com

LoyolaPress. | A Jesuit Ministry
3441 N. Ashland Ave. | Chicago, IL 60657 | 
www.loyolapress.com
Join our online community of advisors: 
www.SpiritedTalk.org



Re: [docbook-apps] Removing HTML TOC from epub

2011-09-23 Thread Keith Fahlgren
Hi,

On Thu, Sep 22, 2011 at 11:30 PM, davep  wrote:
> Since the toc is never needed (the ncx supplants a toc), would it make sense
> to delete the call to generate it such that annoyance is removed?


Many publishers deliberately include an HTML TOC in their EPUB
documents. An HTML TOC can offer more nuanced layout and text than an
NCX TOC and is appropriate for some titles.


Regards,
Keith

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Removing HTML TOC from epub

2011-09-23 Thread Nic Gibson

On 23 Sep 2011, at 07:30, davep wrote:

> On 09/22/2011 08:49 PM, Bob Stayton wrote:
>> Hi Chris,
>> Regarrding your first question, you can set the stylesheet param named 
>> 'generate.toc' to empty to turn off the TOC chunk.  You will still get the 
>> NCX toc.
>> I noticed the same issue with customizing the epub 2 stylesheet.  If your 
>> customization consists only of parameter settings, then importing it should 
>> work.  However, it is a chunking stylesheet, so any template changes require 
>> paying careful attention to import precedence for them to work.  Generally 
>> that requires two separate customization files, but the epub/docbook.xsl 
>> needs to be rearranged for that to work.  Based on the experience I gained 
>> from creating the epub 3 stylesheet, I plan to rearrange the files in the  
>> epub directory for EPUB 2 output to make it easier to customize.
>> Bob Stayton
>> Sagehill Enterprises
>> b...@sagehill.net 
> 
> Since the toc is never needed (the ncx supplants a toc), would it make sense
> to delete the call to generate it such that annoyance is removed?
> 

It might be worth pointing out that if you are planning to convert this to 
Kindle, the HTML TOC is required. 

nic

--

Nic Gibson
Corbas Consulting
Digital Publishing Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817 



-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org