Search code examples
xsltxsl-fo

How to write code in xslfo for the following output?


I have a list of records like One two three When i am using <fo:list-item></fo:list-item> iam getting output as

[1]. One
[2]. Two
[3]. Three

Here we need to remove "." from that list of items. Can anyone help with this ? Thanks in advance


Solution

  • Modified Sample from the W3C xsl-fo spec

      <fo:list-item>
        <fo:list-item-label start-indent="5mm" end-indent="label-end()">
          <fo:block>
            <xsl:number format="1"/>
          </fo:block>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()">
          <fo:block>
            <xsl:apply-templates/>
          </fo:block>
        </fo:list-item-body>
      </fo:list-item>
    

    Specify the format you want inside the xsl:number format= like e.g. 1 to get numbers without dots.