siarom egrub wrote:
I am trying to have the <listitem>s in an
<orderedlist> to display numerical values. The XSLFO
template below that I've developed is displaying zeros
"0" for all the list items.
...
<xsl:template match="orderedlist/listitem/para">
   <fo:list-block...>
     <fo:list-item>
       <fo:list-item-label...>
         <fo:block>
             <xsl:number count="orderedlist/listitem"

You are matching orderedlist/listitem/para above and
counting orderedlist/listitem here. The para elements
don't have these descendants, and you get 0. Furthermore,
you create a list-block for every single list item in your
ordered list, which is probably not what you intended.

A more correct approach would be

<xsl:template match="orderedlist">
   <fo:list-block provisional-label-separation="4em"
provisional-distance-between-starts="4em">
    <xsl:for-each select="listitem">
     <fo:list-item>
       <fo:list-item-label start-indent="2mm"
end-indent="label-end()">
         <fo:block>
             <xsl:number count="." level="any" from="manual"/>
         </fo:block>
       </fo:list-item-label>
       <fo:list-item-body>
          <fo:block start-indent="6mm"><xsl:apply-templates/></fo:block>
       </fo:list-item-body>
     </fo:list-item>
    </xsl:for-each>
   </fo:list-block>
</xsl:template>
        
You might have to provide an appropriate template matching para
elements.


Note that this is actually an XSLT question. You get faster replies
for this kind of questions if you ask on the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/

J.Pietschmann

Reply via email to