Re: [docbook-apps] How to insert admonition graphic filepath

From
"Cob Rtayton"
Date
2005-07-19T07:06:34+00:00
ID
062501c58c30$5877eb20$6400a8c0@toshiro
Thread
Re: [docbook-apps] How to insert admonition graphic filepath
I think you are misunderstanding what an 
attribute-set can do.  An attribute-set puts attributes onto an fo:block 
element.  In your customization, you are putting an fo:external-graphic 
element into the attribute value for 
border-color.  You can't put an element into an attribute value. Doesn't 
that generate an error when you run 
it?  At best you will end up with an empty attribute value for border-color 
(inspect your fo output).

 

To specify the path to your graphical 
admonitions, you need to set one or more stylesheet parameters, as described 
here:

 

http://www.sagehill.net/docbookxsl/Icons.html#AdmonGraphics

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

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

  
From: 
  Supun Gunasena 

  
To:  
  

  
Sent: Sunday, July 17, 2005 9:35 PM

  
Subject: [docbook-apps] How to insert 
  admonition graphic filepath

  

  

  
Hi,

  
 

  
The location of all my admonition graphics, eg Note is stored in C:/Program Files/DocBook/images

  
 

  
In, the XSL stylesheet, 
  where do I define the location of the graphic note.png

  
 

  
My code in my ‘pdf.xsl’ is as 
  follows:

  
 

  
xsl:attribute-set name="admonition.properties">

  
                        
  <xsl:attribute 
  name="padding">.33em 0 0 5px</xsl:attribute>

  
 

  
                        
  <xsl:attribute 
  name="border-left">1px solid</xsl:attribute>

  
                        
  <xsl:attribute 
  name="border-color">

  
                                    
  <xsl:variable 
  name="node" select="."/>

  
                                    
  <xsl:choose>

  
                                                
  <xsl:when 
  test="name($node)='note'">

  
                                                
  <fo:external-graphic height="-1.0pt" scaling="uniform" 
  space-before ="5pt" 
  src="file:///C%3A/Program%20Files/DocBook/images/orionlogosmall.png" 
  width="2.0pt">

  
                                                                                                            
  </fo:external-graphic>

  
                        
  

  
                                                
  

  
                                    
          
  </xsl:when>

  
                                                
  <xsl:when 
  test="name($node)='warning'">#900</xsl:when>

  
 

  
 

  
 

  
Is this file declaration correct? This code above 
  results in a X being displayed in the ‘Note’ box in 
  the PDF.

  
 

  
Kind regards,

  
 

  
Supun Gunasena