<?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: Detachment test - removeBinding() while other bindings attached.</title>
    <style type='text/css'>
    </style>
    <xbl xmlns="http://www.w3.org/ns/xbl" >
     <binding id="basebinding" element="#bound">
      <template><div><inherited>One binding.</inherited></div></template>
     </binding>
     <binding id="inherited">
      <template>More bindings attached.</template>
     </binding>
     <binding id="Binding" extends="#inherited">
      <template><div><inherited><content /></inherited></div></template>
      <handlers>
       <handler event="click" >
        var boundElement = document.getElementById("bound");
        boundElement.removeBinding("#Binding");
       </handler>
      </handlers>
     </binding>
     <binding element="p">
      <handlers>
       <handler event="click" >
        var boundElement = document.getElementById("bound");
        boundElement.addBinding("#Binding");
       </handler>
      </handlers>
     </binding>
    </xbl>
  </head>
  <body>
   <b id="bound">Error</b>
   <p>Click this text. The One binding text above should change if the binding is attached correctly. Click the new text and the One binding text should appear again if the binding was correctly removed. If there is text saying Error, then any of the bindings is not attached.</p>
  </body>
</html>
