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

<deliverance-test>
<rules xmlns="http://www.plone.org/deliverance">
</rules>

<theme base="http://www.example.com/foo/bar/" >
  <html>
     <head>
       <style type="text/css">
         @import url(whatever.css)
       </style>
     </head>
     <body>
        <a href="quux/zoop">zoop</a>
     </body>
  </html>
</theme>

<content>
</content>

<output> 
  <html>
     <head>
       <style type="text/css">
          @import url(http://www.example.com/foo/bar/whatever.css)
       </style>
       </head>
       <body>
          <a href="http://www.example.com/foo/bar/quux/zoop">zoop</a>
       </body>
     </html>
</output>

</deliverance-test>

<!-- tests url replacement successfully; replaces the relative urls with absolute urls based on <base> if present --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance">
  </rules>

  <theme base="http://nycsr.org"> 
    <html>

      <head>
	<style type="text/css" media="screen">
	  @import url(/css/test-style.css);
	  @import url(http://www.example.com/foo.css);
	  @import url('/foo/bar.css');
	  @import url("/flub/quone.css");
	  @import "joop/win.css";
	  #effbot-nav {
	  float: left;
	  width: 180px;
	  margin: 0;
	  padding: 10px;
	  }
	</style>
	<script src="js/gallery.js" type="text/javascript" language="javascript" />
	<title>Blah</title>
      </head>
      <body>
	<a href="/nyc/photo.php">Photo Gallery</a>
	<a href="http://nycsr.org/lessons/benefits.php">The Benefits of Great Streets</a>
      </body>
    </html>
  </theme>

  <content> 
  </content>
  
  <output>
    <html>
      <head>
	<style type="text/css" media="screen">
	  @import url(http://nycsr.org/css/test-style.css);
	  @import url(http://www.example.com/foo.css);
	  @import url(http://nycsr.org/foo/bar.css);
	  @import url(http://nycsr.org/flub/quone.css);
	  @import url(http://nycsr.org/joop/win.css);
	  #effbot-nav {
	  float: left;
	  width: 180px;
	  margin: 0;
	  padding: 10px;
	  }
	</style>
	<script src="http://nycsr.org/js/gallery.js" type="text/javascript" language="javascript" />
	<title>Blah</title>
      </head>
      <body>
	<a href="http://nycsr.org/nyc/photo.php">Photo Gallery</a>
	<a href="http://nycsr.org/lessons/benefits.php">The Benefits of Great Streets</a>
      </body>
    </html>
  </output> 
</deliverance-test>


<!-- tests url replacement successfully; replaces the relative urls with absolute urls; inline <base> tag
overrides the attribute on the <theme> tag --> 
<deliverance-test>
  <rules xmlns="http://www.plone.org/deliverance">
  </rules>

  <theme base="http://example.com"> 
    <html>
      <head><style type="text/css" media="screen">@import url(/css/test2-style.css);</style>
	<script src="js/gallery.js" type="text/javascript" language="javascript" />
	<title>Blah</title>
	<base href="http://nycsr.org" />
      </head>
      <body>
	<a href="/nyc/photo.php">Photo Gallery</a>
	<a href="http://nycsr.org/lessons/benefits.php">The Benefits of Great Streets</a>
      </body>
    </html>
  </theme>

  <content> 
  </content>
  
  <output>
    <html>
      <head><style type="text/css" media="screen">@import url(http://nycsr.org/css/test2-style.css);</style>
	<script src="http://nycsr.org/js/gallery.js" type="text/javascript" language="javascript" />
	<title>Blah</title>
      </head>
      <body>
	<a href="http://nycsr.org/nyc/photo.php">Photo Gallery</a>
	<a href="http://nycsr.org/lessons/benefits.php">The Benefits of Great Streets</a>
      </body>
    </html>
  </output> 
</deliverance-test>

</deliverance-test-suite>
