← Prev in month ← Prev in thread

Re: [docbook-apps] Image scaling in Docbook with XEP trick

From
Bob Stayton <>
Date
2005-05-03T16:44:50+00:00
ID
039101c54fff$62727450$6400a8c0@toshiro
Thread
Re: [docbook-apps] Image scaling in Docbook with XEP trick
The XEP XSL example would not work in 
DocBook XSL because it has a match="image" template, and there is no 
<image> element in DocBook.

 

You can set the attributes on individual 
imagedata elements in your DocBook document. See the third bullet item in this 
reference:

 

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

 

If you want to automatically apply these 
properties to all images, you will need to create a stylesheet customization 
layer, copy the template named 'process.image' from fo/graphics.xsl, and modify 
it to automatically set those properties.  It's a long and complex 
template, though, because it has to handle a lot of different combinations of 
attributes and parameters. 

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

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

  
From: 
  Zbyszek 
  Cybulski 

  
To: DocBook Apps 

  
Cc: Bob Stayton 

  
Sent: Tuesday, April 26, 2005 2:03 
  PM

  
Subject: Re: [docbook-apps] Image scaling 
  in Docbook with XEP trick

  

Oh, I forgot, you're right.
The entire example can be found 
  at http://renderx.com/usecasestest.html

In the example, 
  the source XML file: http://xep.xattic.com/xep/testsuite/usecases/image-scale.xml
The 
  set of XSL stylesheets: http://xep.xattic.com/xep/testsuite/usecases/generic.xsl 
  and  http://xep.xattic.com/xep/testsuite/usecases/image-scale.xsl
The 
  FO output: http://xep.xattic.com/xep/testsuite/usecases/image-scale.fo

The 
  example is pretty simple but I failed to adopt it for my 
  purposes.

-Z

On 4/26/05, Bob Stayton <> wrote:
> You 
  aren't giving us enough information.
> Can you describe the properties 
  that RenderX recommends you use in the FO 
> output?
> 
> 
  Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> 
> 
> 
  
> ----- Original Message ----- 
> From: "Zbyszek Cybulski" <>
> To: 
  <>; 
  "docbook" < >
> 
  Sent: Tuesday, April 26, 2005 1:13 AM
> Subject: [docbook-apps] Image 
  scaling in Docbook with XEP trick
> 
> > Hi,
> 
  >
> >
> > How do I auto-scale wide images in Docbook? I 
  have read the RenderX's
> > tutorial on scaling images (use of 
  scale-to-fit) but still don't know
> > how to incorporate this trick 
  into my own customization layer. The 
> > example is shown for a 
  generic XML and I understand what happens there
> > but can't 
  translate it into Docbook stuff.
> > If I import the image-scale.xsl 
  stylesheet in my customization, it fails 
> > since before I also 
  imported the docbook.xsl stylesheet. I have reviewed
> > the XSL-FO 
  output and it doesn't look as shown in the tutorial example.
> 
  >  How do I modify image-scale.xsl and/or my customization 
  imports to make 
> > it work?
> >
> > Thanks in 
  advance,
> > Zbyszek
> >
> > 
  ---------------------------------------------------------------------
> 
  > To unsubscribe, e-mail: 
> 
  > For additional commands, e-mail:  
  
> >
> >
> >
> 
>
← Prev in month ← Prev in thread