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] | [Elist Home]


Subject: DOCBOOK-APPS: customizing titlepage,was: inlinemediaobject on coverpage/docbookXSL


At 8:51 AM -0800 2/22/02, Bob Stayton wrote:
>On Fri, Feb 22, 2002 at 03:33:21AM -0500, Stephen Bannasch wrote:
>> I'd like to display an image on the cover page.  All I can get is the title and author.  I've tried including it in the bookinfo/title element as an inlinemediaobject however it then appears on the second page just after a fully justified duplication of the title.
>>
>> I'm using v1.49 of the xsl stylesheets.
>
>There's an answer in Dave Pawson's FAQ on title
>page customization:
>
>http://www.dpawson.co.uk/docbook/styling/titlepage.html

Thanks for the pointer Bob,

I looked at Dave's site along with Norm's article here:

  http://nwalsh.com/docs/articles/dbdesign/

I wanted to customize my attributes for the elements on my titlepage so I tried using a form like this in my titlepage template :

  <t:titlepage element="book" wrapper='fo:block'>
    <t:titlepage-content side='recto'>
      <title predicate="[1]"
        font-size="24pt"
        space-before="36pt"/>
      <author
        space-before="24pt"/>
      <corpname
        space-before="8pt"/>
      <mediaobject
        space-before="64pt"/>
      <pubdate
        space-before="64pt"/>
      <releaseinfo
        space-before="8pt"/>
    </t:titlepage-content>
  </t:titlepage>

None of the additional attributes were passed through into the constructed titlepage.xsl. So I modified <xsl:template match="t:titlepage"> in docbook-xsl-1.49/template/titlepage.xsl as follows:

          <xsl:for-each select="@*">
<!--        <xsl:if test="namespace-uri(.)='http://www.w3.org/1999/XSL/Format'"> -->
            <xsl:if test="local-name(.)!='predicate'">
              <xsl:attribute name="{local-name(.)}">
                <xsl:value-of select="."/>
              </xsl:attribute>
            </xsl:if>
          </xsl:for-each>

My change is probably not optimal because I don't understand how the namespace-uri test was intended to operate.  In any case now I get output like this in the resulting xsl:

<xsl:template match="mediaobject" mode="book.titlepage.recto.auto.mode">
<fo:block xsl:use-attribute-sets="book.titlepage.recto.style" space-before="64pt">
<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
</fo:block>
</xsl:template>

I'm a neophyte in docbook and fo and I am using the space-before attributes to position elements on the page.  My actual intention is to have pubdate and releaseinfo near the bottom of the page and the image centered vertically between corpname and pubdate.

Another problem is that <releaseinfo> is not being printed at all on the titlepage.  I started off using <revision> based on Dave's page but later realized that that is not a legal child of <bookinfo>.  I would instead need a revhistory in bookinfo and then select the last revision for display on my titlepage.

-- 

-- Stephen Bannasch
   Director of Technology, Concord Consortium
   http://www.concord.org  mailto:stephen@concord.org


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


Powered by eList eXpress LLC