Next in thread → Next in month →

Re: [docbook-apps] How to use copyright.years template in footer?

From
"Cob Rtayton"
Date
2006-10-27T05:47:12+00:00
ID
013501c6f98b$40659f90$6400a8c0@totoro
Thread
Re: [docbook-apps] How to use copyright.years template in footer?
It look fine, except I would add a case where count() = 0 for completeness.

Bob Stayton
Sagehill Enterprises
DocBook Consulting


----- Original Message ----- 
From: "Darya Said-Akbari" <>
To: <>
Sent: Thursday, October 26, 2006 7:31 AM
Subject: RE: [docbook-apps] How to use copyright.years template in footer?

> Seems that I can't use the copyright.years template
> this way because I am not in the context of matching a
> year element.
>
> Hence I use:
>
>    <xsl:choose>
>      <xsl:when
> test="count(/book/bookinfo/copyright/year) = 1">
>       <xsl:value-of
> select="/book/bookinfo/copyright/year[position()]"/>
>      </xsl:when>
>      <xsl:otherwise>
>        <xsl:value-of
> select="/book/bookinfo/copyright/year[position()]"/><xsl:text>-</xsl:text><xsl:value-of
> select="/book/bookinfo/copyright/year[last()]"/>
>      </xsl:otherwise>
>    </xsl:choose>
>
> This is maybe not the finest form but it behaves
> similar to the title page copyright handling.
>
> Regards,
> Darya
>
> --- Darya Said-Akbari <>
> schrieb:
>
>> Hi,
>>
>> I try to use the copyright.years template from
>> common/common.xsl in my footer.
>>
>> My customization look like:
>>
>> <xsl:param name="make.year.ranges" select="1"/>
>>
>> <xsl:template name="footer.copyright">
>>   <xsl:call-template name="copyright.years">
>>     <xsl:with-param name="years" select="year"/>
>>     <xsl:with-param name="print.ranges"
>> select="$make.year.ranges"/>
>>     <xsl:with-param name="single.year.ranges"
>> select="$make.single.year.ranges"/>
>>   </xsl:call-template>
>> </xsl:template>
>>
>>
>> <xsl:variable name="footercandidate">
>>   <xsl:choose>
>>
>>     <xsl:when test="$sequence = 'odd' and $position
>> =
>> 'center'">
>>       <xsl:call-template name="footer.copyright"/>
>>     </xsl:when>
>>     ...
>>
>> I would expect that in my footer something like
>> 2001-2006 shows up but that's not happening.
>>
>> Is there anything wrong in above snippet?
>>
>> Regards,
>> Darya
>>
>>
>>
>>
>>
>>
>>
> ___________________________________________________________
>>
>> Der frühe Vogel fängt den Wurm. Hier gelangen Sie
>> zum neuen Yahoo! Mail: http://mail.yahoo.de
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> 
>> For additional commands, e-mail:
>> 
>>
>>
>
>
>
>
> ___________________________________________________________
> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
>
>
>
Next in thread → Next in month →