Hi,
That problem looks like a bug in FOP. Can you process your FO output with
another XSL-FO processor to see if that corrects the problem?
Bob Stayton
Sagehill Enterprises
----- Original Message -----
From: "Dongsheng Song" <>
To: "Bob Stayton" <>
Cc: "DocBook Apps" <>
Sent: Tuesday, December 30, 2008 12:04 AM
Subject: Re: [docbook-apps] I'm want to indent only 'section/para', not
'section/para/programlisting'
> Thank you, I make a chinese copy[2] of 'DocBook 5.0: The Definitive
> Guide'[1],
> It's fine.
>
> But some page[3] layout is broken, could you give me some advice?
>
> [1] http://i18n-zh.googlecode.com/files/defguide5-r8198-4cad.pdf
> [2] http://i18n-zh.googlecode.com/files/defguide5-r8198-4cad-zh.pdf
> [3] http://i18n-zh.googlecode.com/files/defguide5-r8198-4cad-zh.png
>
> 2008/12/30 Bob Stayton <>:
>> The problem is that the XSL-FO property text-indent is an inherited
>> property. That means it is applied to any fo:block elements contained in
>> the para's fo:block. That's why the fo:block containing your
>> programlisting
>> text also has that property, even though it doesn't show in the FO file.
>> The
>> other complication is that para allows both inline and block elements, as
>> well as text, so it can be difficult to sort out how to apply a solution
>> to
>> subelements of para.
>>
>> You might try this oversimplified solution using fo:wrapper to turn off
>> the
>> text-indent for all subelements:
>>
>> <xsl:template match="section/para/*">
>> <fo:wrapper text-indent="0pt">
>> <xsl:apply-imports/>
>> </fo:wrapper>
>> </xsl:template>
>>
>> This wraps any subelement output in an fo:wrapper to reset the
>> text-indent
>> property. It then uses xsl:apply-imports to apply the stock DocBook
>> template
>> for each subelement. However, if you have a customization of one of
>> those
>> subelements, then the apply-imports will ignore that customization and go
>> back to the original stock template. So any customized templates for
>> such
>> elements must also have this solution. Not pretty, and there are
>> probably
>> situations where it won't work properly.
>>
>> Bob Stayton
>> Sagehill Enterprises
>>
>>
>>
>> ----- Original Message ----- From: "Dongsheng Song"
>> <>
>> To: "DocBook Apps" <>
>> Sent: Monday, December 29, 2008 1:34 AM
>> Subject: [docbook-apps] I'm want to indent only 'section/para', not
>> 'section/para/programlisting'
>>
>>
>>> When I use custom xsl to indent 'section/para':
>>>
>>> <xsl:attribute-set name="standard.para.spacing"
>>> use-attribute-sets="normal.para.spacing">
>>> <xsl:attribute name="text-indent">24pt</xsl:attribute>
>>> </xsl:attribute-set>
>>>
>>> <xsl:template match="section/para">
>>> <fo:block xsl:use-attribute-sets="standard.para.spacing">
>>> <xsl:call-template name="anchor"/>
>>> <xsl:apply-templates/>
>>> </fo:block>
>>> </xsl:template>
>>>
>>> But 'section/para/programlisting' indent too, how can I avoid it indent
>>> any
>>> subelements of 'section/para'?
>>>
>>> Thanks,
>>>
>>> Dongsheng Song
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> For additional commands, e-mail:
>>>
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>