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: [SOLVED] Including external documents

Bob Stayton <bobs <at> sagehill.net> writes:

> Hi John,
> The block-container with the zero-length fo:leader is generated by the 
> <?dbfo-need height="0.00in" ?> processing instruction.  I would suggest you 
> just remove that.  The dbfo-need mechanism does not work in FOP, and a 
> zero-height value should have no effect anyway.

I have removed dbfo-need. It seems that my mediaobject had the wrong
scaling properties. See below.

> The page break should come 
> automatically because the image is too big to fit in the space remaining on 
> the first page and will be forced to the next page.  Or from the 
> break-before attribute you add.

It works as you describe now. I had scale="100%", but I changed it to

> One approach might be to add a template like this (untested):
> <xsl:template match="mediaobject[ancestor::appendix[@role = 
> 'external-doc']]">
>   <fo:block font-size="0" line-height="0" break-before="page" 
> break-after="page"   start-indent="0" end-indent="0">
>     <xsl:apply-imports/>
>   </fo:block>
> </xsl:template>

The template didn't match for two reasons:

1) I did not declare the docbook namespace:
2) The customisation did not have the namespace qualifier:
   <xsl:template match="d:mediaobject[ancestor::d:appendix[@role =
> This will match only on a mediaobject contained in your special appendix. 
> It outputs a block wrapper with the necessary values, and then generates the 
> normal mediaobject output in it by using xsl:apply-imports.

I changed the template to:
 <xsl:template match="d:appendix[@role='external-doc']/d:mediaobject">

This way, the mediaobject matches only if it is a child (not a descendant)
of the special <appendix>. This way, if I want to use a graphic on the
mostly blank title page of the special appendix, I can allow normal DocBook
processing to go ahead by simply enclosing it in a <para> element.

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