<?xml version="1.0"?>
<!-- ============================================================ -->
<!--                                                              -->
<!-- 	This file makes a part of RenderX XSL Test Suite          -->
<!--                                                              -->
<!--    Author: Alexander Peshkov                                 -->
<!--                                                              -->
<!--    (c) RenderX, 2003                                         -->
<!--                                                              -->
<!-- ============================================================ -->
<document>
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:dcterms="http://purl.org/dc/terms/"
           xmlns:db="http://www.oasis-open.org/docbook/xml/4.2/">
    <rdf:Description rdf:about="http://xep.xattic.com/testsuite/usecases/float.xml">
        <dc:creator>Alexander Peshkov</dc:creator>
        <dc:title>Basic use of side floats</dc:title>
        <dc:description>
          <db:para>
            Shows how to use <db:sgmltag class='starttag'>fo:float</db:sgmltag>
            elements with different values of <db:sgmltag class='attribute'>clear</db:sgmltag> property
            to create incuts (illustrations) and floating headers.
          </db:para>
        </dc:description>
        <dc:date>2003-07-21</dc:date>
        <dcterms:requires rdf:resource="http://xep.xattic.com/testsuite/usecases/generic.xsl"/>
        <dcterms:requires rdf:resource="http://xep.xattic.com/testsuite/usecases/float.xsl"/>
    </rdf:Description>
  </rdf:RDF> 
  <section>
  <title>Basic use of side floats</title>
  <para>
	Each float element (<code>fo:float</code>) must have a <code>float</code> property
	which governs its behavior. Depending on this property value, it will float
	to one of a page sides.
	<citation>
      <ulink url="http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_float">XSL FO Recommendation, Chapter 6.10.2 "fo:float"</ulink>
    </citation>
	XSL FO allows you to use following values of <code>float</code>
	property: <code>before</code>, <code>start</code>, <code>end</code>, <code>left</code>, <code>right</code>
	(there is also a <code>none</code> value that makes float behave like a normal block).
	Floats with <code>float="start"</code> and <code>float="end"</code> called "side floats".
    <citation>
      <ulink url="http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#float">XSL FO Recommendation, Chapter 7.18.2 "float"</ulink>
    </citation>
  </para>
  <para>
    Interaction between floating and normal blocks governed by two properties:
    <code>clear</code> and <code>intrusion-displace</code>.
    In this test we demonstrate use of <code>clear</code> property.
    It's description in XSL FO specification is quite clear:
    <citation>
      <ulink url="http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#clear">XSL FO Recommendation, Chapter 7.18.1 "clear"</ulink>
      <simpara>
      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.)
	  </simpara>
	  <simpara>
	  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.
      </simpara>
    </citation>
    Possible values for <code>clear</code> property are: <code>start</code> (<code>left</code> is a synonym),
    <code>end</code> (<code>right</code> is a synonym), <code>both</code>, <code>none</code>
  </para>
  <para>
    In the document below you can see a document with several illustration (figures) and floating header.
    All of them created using side floats with <code>float="start"</code>.
    Note that first two floats (first illustration and floating header) placed side-by-side
    because floating header has <code>clear="none"</code>. Code used for floating header:
    <codeblock>
      &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; 
    </codeblock>
    Every figures created with <code>fo:float</code>
    that has <code>clear="start"</code> thus two last images stacked vertically.
    Code used for figures:
    <codeblock>
      &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;
    </codeblock>
  </para>
  </section>
  <section>
  <title>Carrots &amp; Onion Co.</title>
  <simpara>
    <floating-title>Introduction</floating-title> 
    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.
  </simpara>
  <simpara>
    <figure src="Images/cave.gif"/>
    <floating-title>History</floating-title>
    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.
  </simpara>
  <simpara>
    <floating-title>Products</floating-title>
	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&#176;C) and to grow under the snow (up to 5 feet thick)
	makes it perfectly suitable for mountain climate.
    <figure src="Images/carrot.gif"/>
    <figure src="Images/onion.gif"/>
	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.
  </simpara>
  </section>
</document>
