this.parseElement = function(node, hasParentNodeSet, optimizeForDojoML, thisIdx){  var parsedNodeSet = {};  var tagName = getTagName(node);  if((tagName)&&(tagName.indexOf("/")==0)){ return null; }    var process = true; if(optimizeForDojoML){ var dojoTagName = getDojoTagName(node); tagName = dojoTagName || tagName; process = Boolean(dojoTagName); }  if(node && node.getAttribute && node.getAttribute("parseWidgets") && node.getAttribute("parseWidgets") == "false") { return {}; }  parsedNodeSet[tagName] = []; var pos = tagName.indexOf(":"); if(pos>0){ var ns = tagName.substring(0,pos); parsedNodeSet["ns"] = ns;  if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;} }  if(process){ var attributeSet = this.parseAttributes(node); for(var attr in attributeSet){ if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){ parsedNodeSet[tagName][attr] = []; } parsedNodeSet[tagName][attr].push(attributeSet[attr]); }    parsedNodeSet[tagName].nodeRef = node; parsedNodeSet.tagName = tagName; parsedNodeSet.index = thisIdx||0; }  var count = 0; for(var i = 0; i < node.childNodes.length; i++){ var tcn = node.childNodes.item(i); switch(tcn.nodeType){ case  dojo.dom.ELEMENT_NODE: count++; var ctn = getDojoTagName(tcn) || getTagName(tcn); if(!parsedNodeSet[ctn]){ parsedNodeSet[ctn] = []; } parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count)); if( (tcn.childNodes.length == 1)&& (tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){ parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue; } break; case  dojo.dom.TEXT_NODE: if(node.childNodes.length == 1){ parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue }); } break; default: break; /* case  dojo.dom.ATTRIBUTE_NODE: break; case  dojo.dom.CDATA_SECTION_NODE: break; case  dojo.dom.ENTITY_REFERENCE_NODE: break; case  dojo.dom.ENTITY_NODE: break; case  dojo.dom.PROCESSING_INSTRUCTION_NODE: break; case  dojo.dom.COMMENT_NODE: break; case  dojo.dom.DOCUMENT_NODE: break; case  dojo.dom.DOCUMENT_TYPE_NODE: break; case  dojo.dom.DOCUMENT_FRAGMENT_NODE: break; case  dojo.dom.NOTATION_NODE: break; */ } }   return parsedNodeSet; }; 
this.parseElement=function(node,_6f9,_6fa,_6fb){ var _6fc={}; var _6fd=getTagName(node); if((_6fd)&&(_6fd.indexOf("/")==0)){ return null; } var _6fe=true; if(_6fa){ var _6ff=getDojoTagName(node); _6fd=_6ff||_6fd; _6fe=Boolean(_6ff); } if(node&&node.getAttribute&&node.getAttribute("parseWidgets")&&node.getAttribute("parseWidgets")=="false"){ return {}; } _6fc[_6fd]=[]; var pos=_6fd.indexOf(":"); if(pos>0){ var ns=_6fd.substring(0,pos); _6fc["ns"]=ns; if((dojo.ns)&&(!dojo.ns.allow(ns))){ _6fe=false; } } if(_6fe){ var _702=this.parseAttributes(node); for(var attr in _702){ if((!_6fc[_6fd][attr])||(typeof _6fc[_6fd][attr]!="array")){ _6fc[_6fd][attr]=[]; } _6fc[_6fd][attr].push(_702[attr]); } _6fc[_6fd].nodeRef=node; _6fc.tagName=_6fd; _6fc.index=_6fb||0; } var _704=0; for(var i=0;i<node.childNodes.length;i++){ var tcn=node.childNodes.item(i); switch(tcn.nodeType){ case dojo.dom.ELEMENT_NODE: _704++; var ctn=getDojoTagName(tcn)||getTagName(tcn); if(!_6fc[ctn]){ _6fc[ctn]=[]; } _6fc[ctn].push(this.parseElement(tcn,true,_6fa,_704)); if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){ _6fc[ctn][_6fc[ctn].length-1].value=tcn.childNodes.item(0).nodeValue; } break; case dojo.dom.TEXT_NODE: if(node.childNodes.length==1){ _6fc[_6fd].push({value:node.childNodes.item(0).nodeValue}); } break; default: break; } } return _6fc; }; 
  this.parseElement = function(node, hasParentNodeSet, optimizeForDojoML, thisIdx){    var parsedNodeSet = {};        var tagName = getTagName(node);    //There's a weird bug in IE where it counts end tags, e.g. </dojo:button> as nodes that should be parsed.  Ignore these    if((tagName)&&(tagName.indexOf("/")==0)){      return null;    }        // look for a dojoml qualified name    // process dojoml only when optimizeForDojoML is true    var process = true;    if(optimizeForDojoML){      var dojoTagName = getDojoTagName(node);      tagName = dojoTagName || tagName;      process = Boolean(dojoTagName);    }        if(node && node.getAttribute && node.getAttribute("parseWidgets") && node.getAttribute("parseWidgets") == "false") {      return {};    }    parsedNodeSet[tagName] = [];    var pos = tagName.indexOf(":");    if(pos>0){      var ns = tagName.substring(0,pos);      parsedNodeSet["ns"] = ns;      // honor user namespace filters      if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;}    }    if(process){      var attributeSet = this.parseAttributes(node);      for(var attr in attributeSet){        if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){          parsedNodeSet[tagName][attr] = [];        }        parsedNodeSet[tagName][attr].push(attributeSet[attr]);      }       // FIXME: we might want to make this optional or provide cloning instead of      // referencing, but for now, we include a node reference to allow      // instantiated components to figure out their "roots"      parsedNodeSet[tagName].nodeRef = node;      parsedNodeSet.tagName = tagName;      parsedNodeSet.index = thisIdx||0;    }    var count = 0;    for(var i = 0; i < node.childNodes.length; i++){      var tcn = node.childNodes.item(i);      switch(tcn.nodeType){        case  dojo.dom.ELEMENT_NODE: // element nodes, call this function recursively          count++;          var ctn = getDojoTagName(tcn) || getTagName(tcn);          if(!parsedNodeSet[ctn]){            parsedNodeSet[ctn] = [];          }          parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count));          if( (tcn.childNodes.length == 1)&&            (tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){            parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue;          }          break;        case  dojo.dom.TEXT_NODE: // if a single text node is the child, treat it as an attribute          if(node.childNodes.length == 1){            parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue });          }          break;        default: break;        /*        case  dojo.dom.ATTRIBUTE_NODE: // attribute node... not meaningful here          break;        case  dojo.dom.CDATA_SECTION_NODE: // cdata section... not sure if this would ever be meaningful... might be...          break;        case  dojo.dom.ENTITY_REFERENCE_NODE: // entity reference node... not meaningful here          break;        case  dojo.dom.ENTITY_NODE: // entity node... not sure if this would ever be meaningful          break;        case  dojo.dom.PROCESSING_INSTRUCTION_NODE: // processing instruction node... not meaningful here          break;        case  dojo.dom.COMMENT_NODE: // comment node... not not sure if this would ever be meaningful           break;        case  dojo.dom.DOCUMENT_NODE: // document node... not sure if this would ever be meaningful          break;        case  dojo.dom.DOCUMENT_TYPE_NODE: // document type node... not meaningful here          break;        case  dojo.dom.DOCUMENT_FRAGMENT_NODE: // document fragment node... not meaningful here          break;        case  dojo.dom.NOTATION_NODE:// notation node... not meaningful here          break;        */      }    }    //return (hasParentNodeSet) ? parsedNodeSet[node.tagName] : parsedNodeSet;    //if(parsedNodeSet.tagName)dojo.debug("parseElement: RETURNING NODE WITH TAGNAME "+parsedNodeSet.tagName);    return parsedNodeSet;  };
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/90939f35f46f873d9b1f5c5f818ecf012711dc71/dojo.js/buggy/src/main/resources/org/apache/struts2/static/dojo/dojo.js