OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Help with xsl template for image on the titlepage


Actually, I solved the puzzle by myself.

Just for the record, here is what I did.

1) In my titlepage template I added:

     <mediaobject t:named-template="titlepage.image"  
t:wrapper="fo:block" />

2) In my customization layer I added:

   <xsl:template name="titlepage.image">
     <fo:external-graphic
	width="6.7in"
	height="8.5in"
	content-width="scale-to-fit"
	content-height="scale-to-fit"
	border="solid 1pt" >
       <xsl:attribute name="src">
	<xsl:value-of select="descendant-or-self::imagedata[@fileref][1]/ 
@fileref" />
       </xsl:attribute>
     </fo:external-graphic>
   </xsl:template>

/frank

22 mar 2010 kl. 13.11 skrev Frank Arensmeier:

> Hello list members.
>
> After hours and hours of trail-and-error, I finally ran out of  
> ideas. I am looking for a way to control presentation of one  
> particular image that is supposed to be used on a titlepage (without  
> editing the input XML). What I have achieved  so far is:
>
> 1) I customised the titlepage.templates.xml file found in the fo  
> directory.
> 2) my titlepage now contains the article title, subtitle and one image
> 3) The input XML contains the imageobject (the one that is supposed  
> to find its way to the titlepage) as the first child of the  
> articleinfo node.
>
> What I want to do is, in my customisation layer, to set a fixed size  
> for that particular image and the corresponding image container.
>
> One of my ideas was to tweak the graphics.xsl template, hard code  
> the values for size of the image and the image container and include  
> that customized template in my customization layer. I actually did  
> succeed tweaking the template to my needs. One side effect was that  
> the customized template was applied to all mediaobjects, not just  
> the one on the titlepage. My impression was that by adding  
> 'mode="titlepage" to the template, it would only apply to the  
> titlepage. But that turned out to be wrong.
>
> So my question how can I hardcode attributes (scaling, size etc.)  
> for a particular image in my customization layer.
>
> Am I making sense?
>
> Thank you for your input.
> /frank
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis- 
> open.org
>
>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]