<?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, 2003                                         -->
<!--                                                              -->
<!-- ============================================================ -->
   <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">Basic use of side floats</fo:block>
  
         <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
	Each float element (<fo:wrapper font-family="monospace">fo:float</fo:wrapper>) must have a <fo:wrapper font-family="monospace">float</fo:wrapper> property
	which governs its behavior. Depending on this property value, it will float
	to one of a page sides.
	<fo:block font-size="12pt" font-style="italic" space-before="6pt" space-after="6pt">
      
               <fo:basic-link external-destination="url(http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_float)" color="#0000C0" text-decoration="underline">XSL FO Recommendation, Chapter 6.10.2 "fo:float"</fo:basic-link>
    
            </fo:block>
	XSL FO allows you to use following values of <fo:wrapper font-family="monospace">float</fo:wrapper>
	property: <fo:wrapper font-family="monospace">before</fo:wrapper>, <fo:wrapper font-family="monospace">start</fo:wrapper>, <fo:wrapper font-family="monospace">end</fo:wrapper>, <fo:wrapper font-family="monospace">left</fo:wrapper>, <fo:wrapper font-family="monospace">right</fo:wrapper>
	(there is also a <fo:wrapper font-family="monospace">none</fo:wrapper> value that makes float behave like a normal block).
	Floats with <fo:wrapper font-family="monospace">float="start"</fo:wrapper> and <fo:wrapper font-family="monospace">float="end"</fo:wrapper> called "side floats".
    <fo:block font-size="12pt" font-style="italic" space-before="6pt" space-after="6pt">
      
               <fo:basic-link external-destination="url(http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#float)" color="#0000C0" text-decoration="underline">XSL FO Recommendation, Chapter 7.18.2 "float"</fo:basic-link>
    
            </fo:block>
  
         </fo:block>
  
         <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    Interaction between floating and normal blocks governed by two properties:
    <fo:wrapper font-family="monospace">clear</fo:wrapper> and <fo:wrapper font-family="monospace">intrusion-displace</fo:wrapper>.
    In this test we demonstrate use of <fo:wrapper font-family="monospace">clear</fo:wrapper> property.
    It's description in XSL FO specification is quite clear:
    <fo:block font-size="12pt" font-style="italic" space-before="6pt" space-after="6pt">
      
               <fo:basic-link external-destination="url(http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#clear)" color="#0000C0" text-decoration="underline">XSL FO Recommendation, Chapter 7.18.1 "clear"</fo:basic-link>
      
               <fo:block>
      This property indicates which sides of an element's box(es) may not be adjacent to an earlier floating
	  box. (It may be that the element itself has floating descendants; the 'clear' property has no effect on
	  those.)
	  </fo:block>
	  
               <fo:block>
	  This property may only be specified for block-level elements (including floats). For compact and runing
      boxes, this property applies to the final block box to which the compact or run-in box belongs.
      </fo:block>
    
            </fo:block>
    Possible values for <fo:wrapper font-family="monospace">clear</fo:wrapper> property are: <fo:wrapper font-family="monospace">start</fo:wrapper> (<fo:wrapper font-family="monospace">left</fo:wrapper> is a synonym),
    <fo:wrapper font-family="monospace">end</fo:wrapper> (<fo:wrapper font-family="monospace">right</fo:wrapper> is a synonym), <fo:wrapper font-family="monospace">both</fo:wrapper>, <fo:wrapper font-family="monospace">none</fo:wrapper>
  
         </fo:block>
  
         <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    In the document below you can see a document with several illustration (figures) and floating header.
    All of them created using side floats with <fo:wrapper font-family="monospace">float="start"</fo:wrapper>.
    Note that first two floats (first illustration and floating header) placed side-by-side
    because floating header has <fo:wrapper font-family="monospace">clear="none"</fo:wrapper>. Code used for floating header:
    <fo:block white-space="pre" font-family="monospace">
      &lt;fo:float float="start" clear="none"&gt;
        &lt;fo:block font="bold 12pt Helvetica"
                  margin="8pt 4pt 0pt 0pt"&gt;
          Introduction
        &lt;/fo:block&gt;
      &lt;/fo:float&gt; 
    </fo:block>
    Every figures created with <fo:wrapper font-family="monospace">fo:float</fo:wrapper>
    that has <fo:wrapper font-family="monospace">clear="start"</fo:wrapper> thus two last images stacked vertically.
    Code used for figures:
    <fo:block white-space="pre" font-family="monospace">
      &lt;fo:float float="start" clear="start"&gt;
        &lt;fo:block margin="0pt 4pt 0pt 0pt"&gt;
          &lt;fo:external-graphic src="url(Images/cave.gif)"
                               content-width="50%"
                               content-height="50%"/&gt;
        &lt;/fo:block&gt;
      &lt;/fo:float&gt;
    </fo:block>
  
         </fo:block>
  
      </fo:flow>
   </fo:page-sequence>
  
   <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">Carrots &amp; Onion Co.</fo:block>
  
         <fo:block>
    
            <fo:float float="start" clear="none">
               <fo:block font="bold 12pt Helvetica" margin="8pt 4pt 0pt 0pt">Introduction</fo:block>
            </fo:float> 
    The Carrots &amp; Onion Co. is the worldwide leader in production and delivery of best-of-breed
    carrots and onion. The company was founded in 1812 by an ex-officer of French Army, Leon Napo,
    who brought his first frost-resistant carrot seeds from Russia.
    Since then, Carrots &amp; Onion Co. remains a well-established and highly respected company.
  </fo:block>
  
         <fo:block>
    
            <fo:float float="start" clear="start">
               <fo:block margin="0pt 4pt 0pt 0pt">
                  <fo:external-graphic content-width="50%" content-height="50%" src="url(Images/cave.gif)"/>
               </fo:block>
            </fo:float>
    
            <fo:float float="start" clear="none">
               <fo:block font="bold 12pt Helvetica" margin="8pt 4pt 0pt 0pt">History</fo:block>
            </fo:float>
    As it follows from company name, carrots and onion are vegetables of our choice.
    Throughout the whole history of mankind, these plants had great influence on the sorts of humanity.
    First drawings of carrots were found in Krambenholms caves in early thirties; they are dated 10,000 BC (Fig. 1).
    During his second expedition in Central Africa, a famous Italian archeologist G. Cipollini described
    "the cult of Onion", worshipped in C'wambalanga for more than four thousand years.
  </fo:block>
  
         <fo:block>
    
            <fo:float float="start" clear="none">
               <fo:block font="bold 12pt Helvetica" margin="8pt 4pt 0pt 0pt">Products</fo:block>
            </fo:float>
	Besides the common carrot ("carota vulgaris", shown in Fig. 2),
	several specialty varieties are cultivated at our farms.
	The first one is a frost-resistant "Red Carrot", also known as "Siberian Bear".
	Its ability to withstand low temperatures (up to -10°C) and to grow under the snow (up to 5 feet thick)
	makes it perfectly suitable for mountain climate.
    <fo:float float="start" clear="start">
               <fo:block margin="0pt 4pt 0pt 0pt">
                  <fo:external-graphic content-width="50%" content-height="50%" src="url(Images/carrot.gif)"/>
               </fo:block>
            </fo:float>
    
            <fo:float float="start" clear="start">
               <fo:block margin="0pt 4pt 0pt 0pt">
                  <fo:external-graphic content-width="50%" content-height="50%" src="url(Images/onion.gif)"/>
               </fo:block>
            </fo:float>
	The second variety of carrots is a massive "Creeping Carrot", which needs very little care and 
	still gives sappy roots.
	We grow also such wide-known varieties as the "Indian Hunting Carrot" and the "Rootless Pseudo-Carrot".
	Onion is the second principal plant for Carrots &amp; Onion Co.
	In contrast to carrot, only one sort of onion is cultivated on our fields - "Pomum lacrimae".
	This is  a very old sort of onion: legend says it was named by a famous scientist who once confused
	it with an apple and bit it. This variety of onion can adapt to any kind of soil and always produces
	healthy bulbs (Fig. 3).
	All of them are classified into three categories according to their size, as shown in Table 1.
	We are glad to note that the percentage of 1st grade onions in the harvest is rising year by year.
  </fo:block>
  
      </fo:flow>
   </fo:page-sequence>

</fo:root>