add: if (y.cAssessment.hasAttribute("type") && (y.cAssessment.getAttribute("type") != "in")) throw Error("The element assessment " + XRai.getPath(y) + " has already a type (" + y.getAttribute("type")); y.cAssessment.setAttribute("type","in"); 
context:    this.validate = function() {      if (debug) window.dump("* Validating " + this.getPaths() + "\n");      // Check if there is something to assess      if (this.assessment.getAttribute("a") == "0") XRai.passagesToAssess++;      this.validated = true;      // Update containers      if (debug) window.dump("Updating containers\n");      var lca = XRai.getCommonAncestor(this.start,this.end);      XRai.addContained(this.assessment,lca);      // Create assessments for intersection      var start = XRai.getFirstValidParent(this.start,1);      var end = XRai.getFirstValidParent(this.end,1);      if (debug) window.dump("** Adding assessments for intersection (" + XRai.getPath(start) + "-" + XRai.getPath(end) + ")\n");      for(var x = start; x; x = XRai.nextElementTo(x,end,1)) {         XRai.addPassage(x,this);      }      for(var x = this.start; x; x = XRai.nextElementTo(x,this.end)) {         if (!XRai.isInDocument(x,1)) continue;//          window.dump("In " + XRai.getPath(x) + "\n");         for(var y = x; (y == x) || XRai.isIn(y,x); y = XRai.next(y,1)) {//             window.dump("  In " + XRai.getPath(y) + "\n");            if (!y.cAssessment) {               y.cAssessment = XRai.newAssessment(y,"0",false);/*               if (y.cAssessment.hasAttribute("type"))                  throw Error("The element assessment " + XRai.getPath(y) + " has already a type (" + y.getAttribute("type"));*/               y.cAssessment.setAttribute("type","in");            }         }      }   }
meta: 8632	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8632/118a48a7c56edb8af49d2c17b204d65bb2149adb/article.js/clean/trunk/js/article.js