for(var i=0;i<node.childNodes.length;i++){ switch(node.childNodes[i].nodeType){ case 1: case 5: var _2bd="unknown"; try{ _2bd=dojo.html.getStyle(node.childNodes[i],"display"); } catch(E){ } switch(_2bd){ case "block": case "list-item": case "run-in": case "table": case "table-row-group": case "table-header-group": case "table-footer-group": case "table-row": case "table-column-group": case "table-column": case "table-cell": case "table-caption": _2bb+="\n"; _2bb+=dojo.html.renderedTextContent(node.childNodes[i]); _2bb+="\n"; break; case "none": break; default: if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){ _2bb+="\n"; }else{ _2bb+=dojo.html.renderedTextContent(node.childNodes[i]); } break; } break; case 3: case 2: case 4: var text=node.childNodes[i].nodeValue; var _2bf="unknown"; try{ _2bf=dojo.html.getStyle(node,"text-transform"); } catch(E){ } switch(_2bf){ case "capitalize": var _2c0=text.split(" "); for(var i=0;i<_2c0.length;i++){ _2c0[i]=_2c0[i].charAt(0).toUpperCase()+_2c0[i].substring(1); } text=_2c0.join(" "); break; case "uppercase": text=text.toUpperCase(); break; case "lowercase": text=text.toLowerCase(); break; default: break; } switch(_2bf){ case "nowrap": break; case "pre-wrap": break; case "pre-line": break; case "pre": break; default: text=text.replace(/\s+/," "); if(/\s$/.test(_2bb)){ text.replace(/^\s/,""); } break; } _2bb+=text; break; default: break; } } return _2bb; }; 
dojo.html.renderedTextContent = function(/* HTMLElement */node){  //  summary  //  Attempts to return the text as it would be rendered, with the line breaks  //  sorted out nicely. Unfinished.  node = dojo.byId(node);  var result = "";  if (node == null) { return result; }  for (var i = 0; i < node.childNodes.length; i++) {    switch (node.childNodes[i].nodeType) {      case 1: // ELEMENT_NODE      case 5: // ENTITY_REFERENCE_NODE        var display = "unknown";        try {          display = dojo.html.getStyle(node.childNodes[i], "display");        } catch(E) {}        switch (display) {          case "block": case "list-item": case "run-in":          case "table": case "table-row-group": case "table-header-group":          case "table-footer-group": case "table-row": case "table-column-group":          case "table-column": case "table-cell": case "table-caption":            // TODO: this shouldn't insert double spaces on aligning blocks            result += "\n";            result += dojo.html.renderedTextContent(node.childNodes[i]);            result += "\n";            break;          case "none": break;          default:            if(node.childNodes[i].tagName && node.childNodes[i].tagName.toLowerCase() == "br") {              result += "\n";            } else {              result += dojo.html.renderedTextContent(node.childNodes[i]);            }            break;        }        break;      case 3: // TEXT_NODE      case 2: // ATTRIBUTE_NODE      case 4: // CDATA_SECTION_NODE        var text = node.childNodes[i].nodeValue;        var textTransform = "unknown";        try {          textTransform = dojo.html.getStyle(node, "text-transform");        } catch(E) {}        switch (textTransform){          case "capitalize":            var words = text.split(' ');            for(var i=0; i<words.length; i++){              words[i] = words[i].charAt(0).toUpperCase() + words[i].substring(1);            }            text = words.join(" ");            break;          case "uppercase": text = text.toUpperCase(); break;          case "lowercase": text = text.toLowerCase(); break;          default: break; // leave as is        }        // TODO: implement        switch (textTransform){          case "nowrap": break;          case "pre-wrap": break;          case "pre-line": break;          case "pre": break; // leave as is          default:            // remove whitespace and collapse first space            text = text.replace(/\s+/, " ");            if (/\s$/.test(result)) { text.replace(/^\s/, ""); }            break;        }        result += text;        break;      default:        break;    }  }  return result;  //  string}
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