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

<!-- This tests | in xpath rules, as well as the not-really-xpath ||
     operator -->

<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance">
    <copy theme=".//div[@id='foo']" 
     content=".//span[@class='bar'] | .//div[@class='foo']" />
  </rules>

  <theme base="http://example.com"> 
     <html><head><title>Blah</title></head>
     <body>
       <div></div>
       <div id="foo">Dummy Content</div>
       <div class="foo">More Dummy</div>
     </body></html>
  </theme>

  <content> 
     <html><body>
       <div class="bar">Real Content</div>
       <span class="bar">1</span>
       <span class="quux">2</span>
       <p>zzz</p>
       <div class="foo">3</div>
       <div class="bar">4</div>
     </body></html>
  </content>
 
  <output>
     <html><head><title>Blah</title></head><body>
       <div></div>
       <div id="foo">
         <span class="bar">1</span>
         <div class="foo">3</div>
       </div>
       <div class="foo">More Dummy</div>
     </body></html>
  </output> 
</deliverance-test>

<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance">
    <copy theme=".//div[@id='foo']" 
     content=".//div || .//body/*" />
  </rules>

  <theme base="http://example.com">
   <html><body><div id="foo"></div></body></html>
  </theme>

  <content>
   <html><body>
    <div>some content</div>
    <span>more content</span>
   </body></html>
  </content>

  <output>
   <html><body><div id="foo">
     <div>some content</div></div></body></html>
  </output>
</deliverance-test>


<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance">
    <copy theme=".//div[@id='foo']" 
     content=".//div || .//body/*" />
  </rules>

  <theme base="http://example.com">
   <html><body><div id="foo"></div></body></html>
  </theme>

  <content>
   <html><body>
    <span>some content</span>
    <span>more content</span>
   </body></html>
  </content>

  <output>
   <html><body><div id="foo">
     <span>some content</span>
     <span>more content</span>
   </div></body></html>
  </output>
</deliverance-test>


</deliverance-test-suite>
