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] Conceptual problem formatting <preface> material

Oops, hit Send by accident on the previous mail.

I did omit a crucial piece of information.  In the first template I meant to process 
it in a mode other than normal mode:

<xsl:apply-templates select="preface[@role = 'something']" mode="frontmatter"/>

and that uses the template with:

<xsl:template match="preface[@role = 'something']" mode="frontmatter">
   actually processing goes here

and the empty template is for normal mode (without a mode attribute).  Hope that makes 
more sense.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Chris Ridd" <chrisridd@mac.com>
To: "Bob Stayton" <bobs@sagehill.net>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Monday, November 01, 2010 10:41 AM
Subject: Re: [docbook-apps] Conceptual problem formatting <preface> material

> On 1 Nov 2010, at 16:49, Bob Stayton wrote:
>> Hi Chris,
>> I've done similar books like this using preface elements with role attributes, and 
>> then customizing the book template to output them in the order you want.  The 
>> titlepage template system is not really appropriate for that kind of extended 
>> information.
> Right, thanks for helping me avoid that particular blind alley :-)
>> For each special preface, I add a template with match="preface[@role = 
>> 'something']" to handle its formatting, and then add the following to the book 
>> template to apply it:
>> <xsl:apply-templates select="preface[@role = 'something']"/>
>> That way if a book instance does not have such a preface, this step is just 
>> skipped.
>> You'll also want to add an empty template in normal mode to prevent the preface 
>> element from being processed again in book order:
>> <xsl:template match="preface[@role = 'something']"/>
> I'm confused now. Firstly I've got one <preface> with several sections, not multiple 
> <preface>s. (Though we're amenable to creating multiple <preface>s if it makes 
> things easier. It isn't /quite/ separating content from presentation though :-)
> But I'm mostly confused about your contradictory suggestions in the 1st and last 
> lines! ie
> add a template with match="preface[@role='something']" to format it
> add an empty template with match="preface[@role='something']"
> Ah - there's a mode parameter?
>> You'll need to decide which of these have their own fo:page-sequence, and call the 
>> template name 'page.sequence' with that as content.
>> And you'll need to customize the templates named 'page.number.format' and 
>> 'initial.page.number' to get the right page numbering scheme.
>> The trickiest part in this design is getting the copyright and "Contacting" 
>> information on the same page.  The copyright info is normally processed in the 
>> titlepage page-sequence.  For that case, I would customize the template named 
>> 'book.titlepage.verso' to apply templates to that preface element, and leave that 
>> one out of the book template.
> I'm away from my stylesheets ATM, but will look at that tomorrow. I've already 
> managed to remove the copyright stuff from my titlepage, and I *think* I've removed 
> the preface from my book template, so I'm part the way there. The dratted preface 
> still appears in my TOC, so some butchery is still needed...
> Cheers,
> Chris
> ---------------------------------------------------------------------
> 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]