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] First title in chunked output

Thanks for the ideas Jere and Bob.

Jere, I like the idea of using some of the new selection features of CSS3.

Bob, I actually did make the CSS selector more specific as you suggest but I found that at least with some browsers, the selector would also match a sect1 that was lower on the same page as the chapter.

What I've ended up doing in the short term is using the "chunk" template to tell if the element is a chunk or not. If a file has a chapter and a section in it, the chapter will be marked as a chunk and the section will not. This allows me to treat the first titlepage in the file differently. For example, my customized sect1.titlepage looks something like this:

<xsl:template name="chapter.titlepage">
  <div class="titlepage">
    <xsl:variable name="ischunk">
      <xsl:call-template name="chunk"/>
      <xsl:when test="$ischunk='1'">
        <div id="firsttitle"><xsl:copy-of select="$recto.content"/></div>
        <div><xsl:copy-of select="$recto.content"/></div>

Thanks again for your help,

On Jan 3, 2008 5:00 PM, Bob Stayton < bobs@sagehill.net> wrote:
You can make a CSS selector more specific by including the div that contains
the div with class="titlepage".

div.chapter div.titlepage {

Bob Stayton
Sagehill Enterprises

----- Original Message -----
From: "Jere Käpyaho" <jere.kapyaho@gmail.com>
To: "Ken Morse" <kenneth.morse@gmail.com >
Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Sent: Thursday, January 03, 2008 11:49 AM
Subject: Re: [docbook-apps] First title in chunked output

> Hi Ken,
> this is really more of an idea than a solution, but CSS3 has  structural
> pseudoclasses (http://www.w3.org/TR/css3-selectors/ #structural-pseudos),
> some of which might fit the bill. As for  implementations... well, have a
> look at http://www.css3.info, there's  even a selector test suite.
> HTH,
> Jere

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