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

<deliverance-test-suite>

<!-- tests comment preservation --> 


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

  <theme base="http://nycsr.org"> 
    <html>
      <head>
	<title>test</title>
      </head>
      <body>
	<p>some text</p>
	<!-- a theme comment --> 
      </body>
    </html>
  </theme>

  <content>
    <html>
      <body>
	<div class="foo">
	  <!-- a content comment --> 
	</div>
      </body>
    </html> 
  </content>
  
  <output>
    <html>
      <head>
	<title>test</title>
      </head>
      <body>
	<p>some text</p> 
	<!-- a theme comment --> 
	<div class="foo">
	  <!-- a content comment --> 
	</div>
      </body>
    </html>
  </output> 
</deliverance-test>

<!-- a more complicated scripty test --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance">
    <append theme="//head" content="//head/script" /> 
  </rules>

  <theme base="http://nycsr.org"> 
    <html>
      <head>
	<title>test</title>
	<script type="text/javascript"><!--//--><![CDATA[//><!--
		startList = themeFunction() {
			if (document.all&&document.getElementById) {
				navRoot = document.getElementById("menu");
				for (i=0; i<navRoot.childNodes.length; i++) {
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI") {
						node.onmouseover=function() {
							this.className+=" over";
						}
						node.onmouseout=function() {
							this.className=this.className.replace(" over", "");
						}
					}
				}
			}
		}
		window.onload=startList;
		
		//--><!]]>
	</script>
      </head>
      <body>
	<p>some text</p>
	<!-- a theme comment --> 
      </body>
    </html>
  </theme>

  <content>
    <html>
      <head>
	<script type="text/javascript"><!--//--><![CDATA[//><!--
		startList = contentFunction() {
			if (document.all&&document.getElementById) {
				navRoot = document.getElementById("menu");
				for (i=0; i<navRoot.childNodes.length; i++) {
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI") {
						node.onmouseover=function() {
							this.className+=" over";
						}
						node.onmouseout=function() {
							this.className=this.className.replace(" over", "");
						}
					}
				}
			}
		}
		window.onload=startList;
		
		//--><!]]>
	</script> 
      </head>
      <body>
	blah blah blah 
      </body>
    </html> 
  </content>
  
  <output>
    <html>
      <head>
	<title>test</title>
	<script type="text/javascript"><!--//--><![CDATA[//><!--
		startList = themeFunction() {
			if (document.all&&document.getElementById) {
				navRoot = document.getElementById("menu");
				for (i=0; i<navRoot.childNodes.length; i++) {
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI") {
						node.onmouseover=function() {
							this.className+=" over";
						}
						node.onmouseout=function() {
							this.className=this.className.replace(" over", "");
						}
					}
				}
			}
		}
		window.onload=startList;
		
		//--><!]]>
	</script> 
	<script type="text/javascript"><!--//--><![CDATA[//><!--
		startList = contentFunction() {
			if (document.all&&document.getElementById) {
				navRoot = document.getElementById("menu");
				for (i=0; i<navRoot.childNodes.length; i++) {
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI") {
						node.onmouseover=function() {
							this.className+=" over";
						}
						node.onmouseout=function() {
							this.className=this.className.replace(" over", "");
						}
					}
				}
			}
		}
		window.onload=startList;
		
		//--><!]]>
	  </script> 
      </head>
      <body>
	<p>some text</p> 
	<!-- a theme comment --> 
      </body>
    </html>
  </output> 
</deliverance-test>



</deliverance-test-suite>
