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] | [Elist Home]


Subject: Re: DOCBOOK-APPS: xtchunk.xsl - Navigation Images and xml editors


> From: Norman Walsh <ndw@nwalsh.com>
> 
> / Bob Stayton <bobs@caldera.com> was heard to say:
> | The HTML header and footer output is controlled by templates
> | named 'header.navigation' and 'footer.navigation' which
> | are in chunk-common.xsl.  You'll need to copy them to
> | your customization file and modify them.
> | I've reproduced footer.navigation
> | here and marked the points where text is generated.
> | That's where you will want to have it generate <img> tags
> | instead.
> 
> No, I think you want to do this a different way. The header and footer
> navigation templates call gentext.nav.*:
> 
> | change --->     <xsl:call-template name="gentext.nav.prev"/>
> | change --->       <xsl:call-template name="gentext.nav.home"/>
> | change --->     <xsl:call-template name="gentext.nav.next"/>
> | change --->       <xsl:call-template name="gentext.nav.up"/>
> 
> precisely so that you can override *them* to change the navigation.
> 
> | You'll want to replace the gentext calls
> | with literal <img> result elements
> | For example, replace:
> | 
> |   <xsl:call-template name="gentext.nav.next"/>
> | 
> | with:
> | 
> |   <img src="images/next.jpg" >
> |     <xsl:attribute name="alt">
> |       <xsl:call-template name="gentext.nav.next"/>
> |     </xsl:attribute>
> |   </img>
> 
> No, what you want to do in your customization layer (IMHO) is this:
> 
> <xsl:template name="gentext.nav.next"/>
>    <img src="images/next.jpg" alt="next"/>
> </xsl:template>
> 
> This saves you the trouble of copying a large, complex template.

Well, that was my first response. But that hardwires
"next" as the alt text.  If you are only working in
English, or you don't care about the alt text,
then that's fine.  I sought to 
preserve the beautiful localization service that
the existing gentext.nav.next template provides
for the alt text.

> 
> | Of course, an easier approach is to make a feature
> | request that navigational icons be a parameter
> | that you can set without modifying templates.    8^)
> | Seems like a nice feature that others could use.
> 
> Uh, Bob.. :-)

I guess I should have seen that one coming.  8^)

I filed a feature request and assigned it to myself.
I assume this should be handled in a manner similar to
the option for admonition graphics, right?

bobs


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


Powered by eList eXpress LLC