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] 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
bobs@sagehill.net


----- Original Message ----- 
From: "Darya Said-Akbari" <darya_akbari@yahoo.com>
To: <docbook-apps@lists.oasis-open.org>
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 <darya_akbari@yahoo.com>
> 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:
>> docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail:
>> docbook-apps-help@lists.oasis-open.org
>>
>>
>
>
>
>
> ___________________________________________________________
> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
>
> ---------------------------------------------------------------------
> 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]