<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:xbl='http://www.w3.org/ns/xbl'>
  <head>
    <title>XBL 2.0 Test Suite: implementation</title>
    <link rel='help' href='http://www.w3.org/TR/xbl/#implementation0' title='The implementation Element'/>
    <xbl xmlns='http://www.w3.org/ns/xbl'>
     <binding element="#a">
      <implementation>
	function removeError(node) {
		node.setAttribute("style", "background-color: green");
		node.firstChild.nodeValue = "Success";
		document.getElementById("b").setAttribute("style", "background-color: red");
		document.getElementById("b").firstChild.nodeValue = "ERROR, click this";
		document.getElementById("b").setAttribute("class", "remerr;");
	}
      </implementation>
     </binding>
     <binding element="#b">
      <implementation>
	function removeError(node) {
		node.setAttribute("style", "background-color: green");
		node.firstChild.nodeValue = "Success";
	}
      </implementation>
     </binding>
     <binding element=".remerr">
      <handlers>
       <handler event="click">
        removeError(this);
       </handler>
      </handlers>
     </binding>
    </xbl>
  </head>
  <body onload="inita();">

<!-- Uncomment this to see how this test should work. Use e.g. Firefox
<script>
	function inita() {
	document.getElementById('a').setAttribute("onclick", "removeError(this);");
	}

	function removeError(node) {
	node.setAttribute("style", "background-color: green");
	node.firstChild.nodeValue = "Success";
	if (node.id != "b") {
		document.getElementById("b").setAttribute("style", "background-color: red");
		document.getElementById("b").firstChild.nodeValue = "ERROR, click this";
		document.getElementById("b").setAttribute("onclick", "removeError(this);");
	}
	}
</script>
-->
<div id="a" class="remerr" style="background-color: red">ERROR, click this</div>
<div>&nbsp;<br/>&nbsp;<br/></div>
<div id="b" class="remerr" style="background-color: red">ERROR</div>

  </body>
</html>
