<?xml version="1.0" encoding="utf-8"?><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions">
<!-- ============================================================ -->
<!--                                                              -->
<!-- 	This file makes a part of RenderX XSL Test Suite          -->
<!--                                                              -->
<!--    Author: Alexander Peshkov                                 -->
<!--                                                              -->
<!--    (c) RenderX, 2004                                         -->
<!--                                                              -->
<!-- ============================================================ --><fo:layout-master-set><fo:simple-page-master master-name="document-master" margin="0.4in"><fo:region-body margin="20pt" padding="0pt"/></fo:simple-page-master></fo:layout-master-set>
   
  <fo:page-sequence master-reference="document-master"><fo:flow flow-name="xsl-region-body" padding="6pt">
  <fo:block font="bold 16pt Helvetica" space-before="16pt" space-after="16pt" text-align="center" span="all">Decimal point alignment using <fo:wrapper font-family="monospace">fo:list-block</fo:wrapper> or <fo:wrapper font-family="monospace">fo:leader</fo:wrapper></fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    To align text on a decimal point without using <fo:wrapper font-family="monospace">text-align="."</fo:wrapper>,
    you have to split the number into two parts (integer and fraction) and
    format them separately (splitting can be done in XSLT). The most
    concise method is to wrap the fractional part into a leader with fixed
    length; then you can align the whole to the right. More or less like
    this:
	<fo:block white-space="pre" font-family="monospace">
$123,456&lt;fo:leader leader-pattern="use-content"
                   leader-length="18pt"
                   leader-pattern-width="18pt"&gt;.78&lt;/fo:leader&gt;	
	</fo:block>	
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    Code above guarantees the fixed distance of 18pt
    from the decimal point to the right edge of the inline object,
    regardless of the actual length of the fractional part. Aligning
    these constructs to the right produces the desired effect.
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    The method discussed above is not the only one.
    You can also put the integer and the fraction to adjacent
    cells in a table, or to label/body of a list object. These
    methods are more verbose albeit conceptually simpler.
    Code below demonstrates decimal point alignment created with 
    <fo:wrapper font-family="monospace">fo:list-block</fo:wrapper> element:
	<fo:block white-space="pre" font-family="monospace">
&lt;fo:list-block start-indent="0in"
               provisional-label-separation="0pt"
               provisional-distance-between-starts="60pt"&gt;
	&lt;fo:list-item&gt;
		&lt;fo:list-item-label end-indent="label-end()"&gt;
			&lt;fo:block text-align="right"&gt;$123,456&lt;/fo:block&gt;
		&lt;/fo:list-item-label&gt;
		&lt;fo:list-item-body start-indent="body-start()"&gt;
			&lt;fo:block text-align="left"&gt;.78&lt;/fo:block&gt;
		&lt;/fo:list-item-body&gt;
	&lt;/fo:list-item&gt;
&lt;/fo:list-block&gt;
	</fo:block>
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    With the code cited above distance between left edge of the parent area and decimal point
    is fixed to 60pt.
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    Below is the table with two columns, every column is 120pt wide and contain some 
	numeric data aligned by decimal point.
	In the first column data is aligned using 'fo:list-block' method cited above,
	in the second column using 'fo:leader' method.
  </fo:block>
  
  <fo:table-and-caption space-after="4pt"><fo:table-caption><fo:block font="bold 10pt Helvetica" keep-with-next="always" space-before="16pt" space-after="6pt" text-align="end"/></fo:table-caption><fo:table border="0.75pt solid black" border-before-width.conditionality="retain" border-after-width.conditionality="retain" width="240pt"><fo:table-column display-align="center" column-width="120pt"/><fo:table-column display-align="center" column-width="120pt"/><fo:table-body>
    <fo:table-row>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:list-block text-indent="0pt" start-indent="0in" provisional-label-separation="0pt" provisional-distance-between-starts="80pt"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block text-align="right">$123,465</fo:block></fo:list-item-label><fo:list-item-body border="thin solid silver" start-indent="body-start()"><fo:block text-align="left">.78</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
      </fo:block></fo:table-cell>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:block text-align="right">$123,465<fo:leader leader-pattern="use-content" leader-length="30pt" leader-pattern-width="30pt">.78</fo:leader></fo:block>
      </fo:block></fo:table-cell>
    </fo:table-row>
    <fo:table-row>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:list-block text-indent="0pt" start-indent="0in" provisional-label-separation="0pt" provisional-distance-between-starts="80pt"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block text-align="right">$545</fo:block></fo:list-item-label><fo:list-item-body border="thin solid silver" start-indent="body-start()"><fo:block text-align="left">.1</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
      </fo:block></fo:table-cell>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:block text-align="right">$545<fo:leader leader-pattern="use-content" leader-length="30pt" leader-pattern-width="30pt">.1</fo:leader></fo:block>
      </fo:block></fo:table-cell>
    </fo:table-row>
    <fo:table-row>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:list-block text-indent="0pt" start-indent="0in" provisional-label-separation="0pt" provisional-distance-between-starts="80pt"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block text-align="right">$1,000</fo:block></fo:list-item-label><fo:list-item-body border="thin solid silver" start-indent="body-start()"><fo:block text-align="left">.00</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
      </fo:block></fo:table-cell>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:block text-align="right">$1,000<fo:leader leader-pattern="use-content" leader-length="30pt" leader-pattern-width="30pt">.00</fo:leader></fo:block>
      </fo:block></fo:table-cell>
    </fo:table-row>
    <fo:table-row>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:list-block text-indent="0pt" start-indent="0in" provisional-label-separation="0pt" provisional-distance-between-starts="80pt"><fo:list-item><fo:list-item-label end-indent="label-end()"><fo:block text-align="right">$99</fo:block></fo:list-item-label><fo:list-item-body border="thin solid silver" start-indent="body-start()"><fo:block text-align="left">.99</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
      </fo:block></fo:table-cell>
      <fo:table-cell border="thin solid silver" border-before-width.conditionality="retain" border-after-width.conditionality="retain" padding="3pt" text-align="from-table-column()" display-align="from-table-column()"><fo:block>
        <fo:block text-align="right">$99<fo:leader leader-pattern="use-content" leader-length="30pt" leader-pattern-width="30pt">.99</fo:leader></fo:block>
      </fo:block></fo:table-cell>
    </fo:table-row>
  </fo:table-body></fo:table></fo:table-and-caption>
  </fo:flow></fo:page-sequence>


</fo:root>