<?xml version="1.0" encoding="UTF-8"?>
<deliverance-test-suite>


<!-- test debug mode with append --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance" debug="true">
    <append theme="//body" content="//body/div" />
  </rules>

  <theme base="http://example.com"> 
    <html>
    <body>
      before the div<div>in the div</div>after the div
    </body></html>
  </theme>

  <content> 
    <html>
      <body><div>Real Content</div>
    </body></html>
  </content>
  
  <output>
    <html>
        <body>
            before the div<div>in the div</div>after the div
         <!--Deliverance: applying rule <append theme="//body" content="//body/div"/>
         --><div>Real Content</div><!--Deliverance: done applying rule <append theme="//body" content="//body/div"/>
         --></body>
      </html>
  </output> 
</deliverance-test>


<!-- test debug mode with append-or-replace --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance" debug="true">
    <append-or-replace theme="//body" content="//body/div" />
  </rules>

  <theme base="http://example.com"> 
    <html>
    <body>
      before the div<div>in the div</div>after the div
    </body></html>
  </theme>

  <content> 
    <html>
      <body><div>Real Content</div>
    </body></html>
  </content>
  
  <output>
    <html>
        <body>
             before the divafter the div
         <!--Deliverance: applying rule <append-or-replace theme="//body" content="//body/div"/>
         --><div>Real Content</div><!--Deliverance: done applying rule <append-or-replace theme="//body" content="//body/div"/>
         --></body>
      </html>
  </output> 
</deliverance-test>



<!-- test debug mode with prepend --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance" debug="true">
    <prepend theme="//body" content="//body/div" />
  </rules>

  <theme base="http://example.com"> 
    <html>
    <body>
      before the div<div>in the div</div>after the div
    </body></html>
  </theme>

  <content> 
    <html>
      <body><div>Real Content</div>
    </body></html>
  </content>
  
  <output>
    <html>
        <body>
         <!--Deliverance: applying rule <prepend theme="//body" content="//body/div"/>
         --><div>Real Content</div><!--Deliverance: done applying rule <prepend theme="//body" content="//body/div"/>
         -->
            before the div<div>in the div</div>after the div
     </body>
      </html>
  </output> 
</deliverance-test>



<!-- test debug mode with replace --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance" debug="true">
    <replace theme="//body/span" content="//body/div" />
  </rules>

  <theme base="http://example.com"> 
    <html>
    <body>
        i'm before the span<span>i'm in a span</span>i'm after the span
    </body></html>
  </theme>

  <content> 
    <html>
      <body><div>Real Content</div>
    </body></html>
  </content>
  
  <output>
    <html>
        <body>
         i'm before the span
         <!--Deliverance: applying rule <replace theme="//body/span" content="//body/div"/>
         --><div>Real Content</div><!--Deliverance: done applying rule <replace theme="//body/span" content="//body/div"/>
         -->
            i'm after the span
     </body>
      </html>
  </output> 
</deliverance-test>



<!-- test debug mode with copy --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance" debug="true">
    <copy theme="//body/span" content="//body/div" />
  </rules>

  <theme base="http://example.com"> 
    <html>
    <body>
      before span<span>inside span</span>after span
    </body></html>
  </theme>

  <content> 
    <html>
      <body><div>Real Content</div> 
    </body></html>
  </content>
  
  <output>
    <html>
      <body>before span
        
         <span> 
	   <!--Deliverance: applying rule <copy theme="//body/span" content="//body/div"/> -->
           <div>Real Content</div>
           <!-- Deliverance: done applying rule <copy theme="//body/span" content="//body/div"/> --></span>
         after span
	   </body>
      </html>
  </output> 
</deliverance-test>


</deliverance-test-suite>

