RE: [docbook-apps] Using draft images with fop, and catalogs.

From
Kerry, Richard <>
Date
2009-02-04T17:20:35+00:00
ID
Thread
RE: [docbook-apps] Using draft images with fop, and catalogs.
Bob,

Thanks for the advice.

I realized that the XSL processor didn't open the graphic 
file but I was wondering whether, since the stylesheet writes out the FO file, 
maybe there was something in the stylesheet that might vary 
what gets written out for use by the FO processor.

I'll enquire on the FOP list about how to get it to use 
catalogs as I can't see anything in the documentation.

 

Appreciatively,

Richard.

 

  

  
  From: Bob Stayton [mailto:] 
  
Sent: 04 February 2009 17:00
To: Kerry, Richard; Docbook 
  Apps
Subject: Re: [docbook-apps] Using draft images with fop, and 
  catalogs.

  

  
The XML catalog file is used when a file is 
  actually opened for use. In the case of graphics in XSL-FO output, the DocBook 
  stylesheet does not open the graphic files, the XSL-FO processor does.  
  So you need to  configure your XSL-FO processor to use your catalog 
  file.  There is a similar issue for resolving the DTD reference that 
  is in some SVG files.  There is a short example in my book for 
  setting up a catalog in XEP, but it would be similar for FOP.

  
 

  
http://www.sagehill.net/docbookxsl/SVGimages.html#SvgDtd

  
 

  
Bob Stayton
Sagehill Enterprises


  
 

  
 

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

    
From: 
    Kerry, Richard 

    
To: Docbook Apps 

    
Sent: Wednesday, February 04, 2009 4:52 
    AM

    
Subject: [docbook-apps] Using draft 
    images with fop, and catalogs.

    

    
 

    
I am using Saxon 
    and FOP to generate PDF files from DocBook.  And I'm using a draft 
    image.

    
My customized 
    stylesheet for DocBook->FO includes a value for the parameter 
    draft.watermark.image.  It is currently the full 
    local path to the draft.png file that I am using (ie somethiing 
    like C:/DocBook/docbook-xsl-1.74.0/images/draft.png)

    
I would like to 
    change it to be a url (or is it a uri), probably using the catalog resolving 
    mechanism that is available in Saxon using the -x, -y, -r, -u 
    qualifiers.  

    
 

    
I notice that at 
    the moment the filename value appears in the FO file in the form 
    "url(images/drft.png)" when I set draft.watermark.image to 
    "images/draft.png" in my custom xsl file.  Thus I presume that the 
    stylesheet is just copying over the parameter value and putting it in 
    "url()".

    
 

    
Can someone 
    advise how to go about doing this.  Do I need to tell the XSL 
    stylesheet to change the format of what it inserts in the FO ?  Or do I 
    need to tell FOP that it's a URL/URI and to use the resolver 
    ?

    
 

    
Uncertainly,

    
Richard.

    
 

    
 

    
 

    

    
Richard 
    Kerry
Colledia Control 
    Engineer
Siemens IT Solutions and Services 
    Ltd
Room 457 Drama Building, BBC 
    Television Centre, Wood Lane, London, W12 7RJ
T: +44 (0)20 
    82259063 F: +44 (0)20 8576 
    8182 M: +44 (0)7921 
    244993
Email: 
Website:  www.siemens.co.uk/it-solutions

    
This e-mail contains 
    confidential information and is for the exclusive use of the 
    addressee/s.  If you are not the addressee, then any distribution, 
    copying or use of this e-mail is prohibited. If received in error, please 
    advise the sender and delete it immediately.  We accept no liability 
    for any loss or damage suffered by any person arising from use of this 
    e-mail.

    
Siemens IT 
    Solutions and Services Limited
Registered 
    No: 1203466 England
Registered Office: Faraday House, Sir William 
    Siemens Square, Frimley, Camberley, GU16 8QD