Hi,
I think you are saying you do not want the text indent on any paras inside a step. If so, you can make that attribute conditional in the attribute set as follows:

<xsl:attribute-set name="normal.para.spacing">
 <xsl:attribute name="text-indent">
   <xsl:choose>
     <xsl:when test="ancestor::step">0pt</xsl:when>
     <xsl:otherwise>10pt</xsl:otherwise>
   </xsl:choose>
 </xsl:attribute>
</xsl:attribute-set>

Now no paras inside a step will have a text-indent.

I'll take a look at the patch you provided to add normal.para.spacing to the first para.


Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Yasushi SHOJI" <[email protected]>
To: "Bob Stayton" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Monday, March 09, 2009 4:18 AM
Subject: Re: [docbook-apps] first <para> in <procedure><step> does not get "normal.para.spacing" attribute


Hi Bob,

I'm attaching small test code.

in that, we have text-indent atrribute in normal.para.spacing
attributes-set.

<xsl:attribute-set name="normal.para.spacing">
  <xsl:attribute name="text-indent">10pt</xsl:attribute>
</xsl:attribute-set>

as you describe below, should we use list.item.spacing, since we do
not want to have text-indent for para's in procedure step?  but what i
do not understand is that the reason why we apply normal.para.spacing
only to the first para, but not others.

thanks,
--
          yashi



--------------------------------------------------------------------------------





At Sat, 7 Mar 2009 01:05:25 -0800,
Bob Stayton wrote:

Hi,
The space before the first para in a step normally comes from this template
in fo/lists.xsl:

<xsl:template match="procedure/step|substeps/step">
    ...
    <fo:list-item xsl:use-attribute-sets="list.item.spacing">

The space specified in the "list.item.spacing" attribute-set is used instead
of "normal.para.spacing".
Putting the space properties on the fo:list-item ensures that the step
number (in the fo:list-item-label) and first para in the fo:list-item-body)
have the same space above so they line up.

I'm curious under what circumstances this arrangement was not working for
you. When I add normal.para.properties to that fo:block as you did it has
no effect.  If it did work, wouldn't it put it out of vertical alignment
with the step number next to it? What XSL-FO processor and version are you
using?

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Yasushi SHOJI" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Friday, March 06, 2009 4:42 AM
Subject: [docbook-apps] first <para> in <procedure><step> does not get
"normal.para.spacing" attribute


> Hi list,
>
> one of my colleagues found that the first <para> does not get
> "normal.para.spacing" attribute in <procedure><step> when we convert
> to fo. The reason seems to us that the first <para> is handled in
>
> env/xsl/docbook-xsl-1.73.2/fo/lists.xsl:309
>
> without use-attribute-set, but all other <para> is handled by
>
> env/xsl/docbook-xsl-1.73.2/fo/block.xsl:34
>
> this was same for 1.74.3, the latest we could get.
>
> attached patch seems to fix the problem but we aren't sure that it is
> the way to go.  please check.
>
> best regards,
> -- > yashi
>
> diff -urN docbook-xsl-1.74.3_org/fo/lists.xsl
> docbook-xsl-1.74.3/fo/lists.xsl
> --- docbook-xsl-1.74.3_org/fo/lists.xsl 2008-05-12 07:27:04.000000000
> +0900
> +++ docbook-xsl-1.74.3/fo/lists.xsl 2009-03-05 17:22:21.000000000 +0900
> @@ -281,7 +281,7 @@
>                                    local-name()='simpara' or
>                                    local-name()='formalpara']"
>               priority="2">
> -  <fo:block>
> +  <fo:block xsl:use-attribute-sets="normal.para.spacing">
>     <xsl:call-template name="anchor"/>
>     <xsl:apply-templates/>
>   </fo:block>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to