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] Initial page numbering for book chapter?



Le 6 juin 2006 à 22:53, Rune Enggaard Lausen a écrit :

> Michèle Garoche wrote:
>> Replying to myself, not sure though if there is not a better way  
>> to do this.
>
> I think maybe there is a slightly better (read: more general) way.  
> I will leave it to the stylesheet authors to correct me if I am  
> wrong :-)
Yes, I thought of the same solution, but I considered that if the  
preface was taken out of the preliminary documents, which surprised  
me a bit, it should exist a good reason for it.

> I have experienced the exact same behavior, and found out that it  
> happens when you have a preface in your book. If you don't have a  
> preface, it works fine. The error is caused by what I think is a  
> bug in the selection of first.book.content.
I think that there is maybe a confusion between what is "first book  
content",  i.e. what occurs only one time at the very beginning of  
the book, and what may occur more that one time, for example preface,  
not necessarily at the beginning of a book, but still is "first book  
content" in the sense that it is preliminary contents to part of a book.

And then another confusion between the classification of those parts  
and their numbering which may vary depending on the usage in  
different countries.

>
> If you have a preface, then first.book.content will be a node set  
> containing the preface. For the first chapter, this will invoke the  
> default case of the <xsl:choose>, causing the first chapter to be  
> numbered by the "auto-odd" rule and continue where the preface left  
> off.
>
> The comment describing first.book.content states that it should  
> "Select the first content that the stylesheet places after the  
> TOC". As I read the code, it really should "Select the first  
> content that the stylesheet places after the TOC, THAT IS NOT  
> HANDLED SEPARATELY BELOW".
>
> Thus, if you add "self::preface or" to the list of tests in the  
> "not" part of the select attribute, everything works as expected, I  
> believe.
>
> To be concrete: Customize initial.page.number such that the  
> definition of first.book.content looks like this (without the note,  
> of course :-)):
>
> <xsl:variable name="first.book.content"
>               select="ancestor::book/*[
>                       not(self::title or
>                           self::subtitle or
>                           self::titleabbrev or
>                           self::bookinfo or
>                           self::info or
>                           self::dedication or
>                           self::toc or
>                           self::preface or <-------- ADDED
>                           self::lot)][1]"/>
>
> I hope the above makes sense. If not, don't hesitate to let me  
> know, and I will try to be clearer. English is not my native  
> language :-D
Make perfect sense to me, and English is not my native language as  
well :-)

Thanks for confirming what effectively seems to be a bug.

Cheers,
Michèle
<http://micmacfr.homeunix.org>

36C471DED4B09EEB30A0281F2608DB2FE6F9E147.gpgkey



=?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=



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