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] Re:[docbook-apps] adminitions - notes - line break after "Note"


On 12/18/06, Bob Stayton <bobs@sagehill.net> wrote:
> The object.title.markup mode does not generate an fo:block or a line break.
> I think what you are seeing is the following: the note element opens an
> fo:block, the object.title.markup template generates the title text, and
> then the para template is processed.  The para template generates an
> fo:block for its content, and so you have a nested fo:block which breaks
> the line before the para.

That's the key bit (which Bob said much more clearly that I did).

>   <xsl:choose>
>     <xsl:when test="child::*[1]/self::para">
>       <fo:block id="{$id}"
>                 xsl:use-attribute-sets="nongraphical.admonition.properties">
> ...
>     </xsl:when>
>     <xsl:otherwise>
>       <xsl:apply-imports/>
>     </xsl:otherwise>
>
> The xsl:choose statement determines if the first child of the note is a
> para, which is a good candidate for run-in text. If it is not a para
> (xsl:otherwise), it reverts to the original behavior using
> xsl:apply-imports.  If it is a para, it generates the title using
> object.title.markup, in the fo:inline to apply the font change from the
> attribute-set, then processes all the *content* of the first para element
> "para[1]/node()", not the para element itself. That prevents the para
> fo:block that was breaking the line.  So now the title and the para content
> are in the same fo:block.  Then it does apply-templates on everything in
> the note after the first para.

Ah, this is wonderful. I hadn't yet thought of
<xsl:apply-templates select="para[1]/node()"/>



Thanks,
Keith


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