<?xml version='1.0' encoding='ISO-8859-1'?>

<!-- This file makes part of an XSL Test Suite -->
<!-- Inlines: inhibit-line-break property      -->

<plain-doc xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:dcterms="http://purl.org/dc/terms/"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:db="http://www.oasis-open.org/docbook/xml/4.2/">
     <rdf:Description rdf:about="http://xep.xattic.com/testsuite/features/linebreak.xml">
        <dc:title> Advanced Inline Attributes - Line Break Control</dc:title>
        <dc:description>
          <db:para>
             Tests control over line splitting.
          </db:para>
        </dc:description>
        <dc:date>2003-07-25</dc:date><dcterms:requires rdf:resource="http://xep.xattic.com/testsuite/features/macro.xsl"/>
    </rdf:Description>
  </rdf:RDF> 

<!-- ============================================= -->
<!-- Auxiliary macros                              -->

<define-macro name="text-always">
  <fo:inline keep-together.within-line="always" color="$arg">
    Line breaks should not split sentences.
  </fo:inline>
</define-macro>

<define-macro name="text-auto">
  <fo:inline keep-together.within-line="auto" color="$arg">
    Line breaks can split sentences anywhere.
  </fo:inline>
</define-macro>

<define-macro name="rule-sequence">
  <fo:inline keep-together.within-line="$arg">
    <repeat times="20">
      <fo:leader leader-length="6pt" 
                 leader-pattern="rule"
                 rule-style="solid"
                 rule-thickness="6pt" 
                 color="$arg1"/>
    </repeat>
  </fo:inline>
</define-macro>

<!-- ============================================= -->
<!-- Main macro                                    -->

<define-macro name="line-break-value">
  <p space-before.optimum="6pt" font-family="Times">
    <repeat times="6">
      <macro name="text-{$arg}" arg="#C00000"/>
      <macro name="text-{$arg}" arg="#0000C0"/>
    </repeat>
  </p>

  <p space-before.optimum="6pt" font-family="Times">
    <repeat times="5">
      <macro name="rule-sequence" arg="$arg" arg1="#C00000"/>
      <macro name="rule-sequence" arg="$arg" arg1="#0000C0"/>
    </repeat>
  </p>

</define-macro>

<!-- ============================================= -->
<!-- Document body                                 -->

<title> Advanced Inline Attributes - Line Break Control</title>
<text> This text tests line splitting capabilities of the formatter.</text>

<h2>Word boundaries</h2>
<text> 
  In the following paragraph, words should not be split by 
  line breaks, nor the brackets should be detached from the words.
</text>

<p font-size="15pt" space-before.optimum="6pt">
  <repeat times="5"> 

    [<fo:inline color="red"><b>un</b></fo:inline><fo:inline
         color="green"><u>break</u></fo:inline><fo:inline
       color="blue"><i><b>able</b></i></fo:inline>]

    (<fo:inline color="red"><b>c</b></fo:inline><fo:inline
             color="blue" font-size="18pt">h</fo:inline><fo:inline
           color="red"><b>a</b></fo:inline><fo:inline
             color="blue" font-size="18pt">r</fo:inline><fo:inline
           color="red"><b>a</b></fo:inline><fo:inline
             color="blue" font-size="18pt">c</fo:inline><fo:inline
           color="red"><b>t</b></fo:inline><fo:inline
             color="blue" font-size="18pt">e</fo:inline><fo:inline
           color="red"><b>r</b></fo:inline>)

    {<fo:inline baseline-shift="0pt" font-size="16.1pt">c</fo:inline><fo:inline
           baseline-shift="3.7pt"    font-size="14.6pt">o</fo:inline><fo:inline
           baseline-shift="5.7pt"    font-size="13.3pt">n</fo:inline><fo:inline
           baseline-shift="6.1pt"    font-size="12.1pt">c</fo:inline><fo:inline
           baseline-shift="4.7pt"    font-size="11.0pt">a</fo:inline><fo:inline
           baseline-shift="2.5pt"    font-size="10.0pt">t</fo:inline><fo:inline
           baseline-shift="0pt"      font-size="9.1pt">e</fo:inline><fo:inline
           baseline-shift="-2.1pt"   font-size="8.2pt">n</fo:inline><fo:inline
           baseline-shift="-3.2pt"   font-size="7.5pt">a</fo:inline><fo:inline
           baseline-shift="-3.4pt"   font-size="6.8pt">t</fo:inline><fo:inline
           baseline-shift="-2.6pt"   font-size="6.2pt">i</fo:inline><fo:inline
           baseline-shift="-1.4pt"   font-size="5.6pt">o</fo:inline><fo:inline
           baseline-shift="0pt"      font-size="5.1pt">n</fo:inline><fo:inline
           baseline-shift="1.2pt"    font-size="4.7pt">s</fo:inline>}
  </repeat>
</p>

<h2> <code> keep-together.within-line</code> attribute </h2>
<text>
  In the paragraph below, no constraint is set on the line breaks:
  they may occur between any space-separated elements.
</text>

  <macro name="line-break-value" arg="auto"/>

<text>
  In the  next paragraph, line breaks may occur <b>only between
  inline elements of different colors</b>
</text>

  <macro name="line-break-value" arg="always"/>

</plain-doc>
