This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: [docbook-apps] Re: [docbook] Using an image on the titlepage
- From: "Mauritz Jeanson" <mj at johanneberg dot com>
- To: "'Paul A. Hoadley'" <paulh at logicsquad dot net>, "'Ben Branders'" <ben dot branders at skynet dot be>
- Cc: <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 25 Apr 2005 17:13:41 +0200
- Subject: RE: [docbook-apps] Re: [docbook] Using an image on the titlepage
> -----Original Message-----
> From: Paul A. Hoadley
>
> You're absolutely right---there's no image on the title page using the
> simple construction:
>
> <fo:block>
> <fo:external-image .../>
> </fo:block>
>
> I can see the template gets executed, but the external-image element
> never makes it to the FO output. Setting up the title-page as a
> table, as in Bob's book, works.
>
> Can anyone explain this?
Yes, the block must have some text content. One way to get around that is to
put a zero-width space (for example) in your customization layer:
<xsl:template name="book.titlepage.recto">
<fo:block>​ <!-- makes block "non-empty" -->
<fo:external-graphic src="url(...)"/>
</fo:block>
</xsl:template>
This is needed because the template with name="book.titlepage" in
titlepage.templates.xsl contains the following test:
<xsl:if test="normalize-space($recto.content) != ''">
<fo:block><xsl:copy-of select="$recto.content"/></fo:block>
</xsl:if>
Without any non-whitespace text nodes, normalize-space() returns an empty
string.
/MJ
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org