1350 Part V . Putting JavaScript to Work output += + ol.childNodes[i].getAttribute( text ) + currState += calcBlockState(outlineID, currID-1) output += // accumulate prefix art for next indented level nestPrefix = prefix nestPrefix += (i == ol.childNodes.length - 1) ?
:
// reflexive call to makeHTML() for nested elements output += makeHTML(outlineID, ol.childNodes[i], nestPrefix) output +=
n } else { // for endpoint nodes output += prefix output +=

// check for links for these entries link = (ol.childNodes[i].getAttribute( uri )) ? ol.childNodes[i].getAttribute( uri ) : if (link) { output +=
} else { output += } // grab the text for these entries output += ol.childNodes[i].getAttribute( text ) + output +=
n } } return output } As with the HTML assembly code of the first outliner, if you were to add attributes to OUTLINE elements in an OPML outline (for example, a URL for an icon to display in front of the text), it is in makeHTML()that the values would be read and applied to the HTML being created. The only other function invoked by the makeHTML() function is calcBlockState(). This function looks into one of the OPML outline s HEAD elements, called EXPANSIONSTATE. This element s values can be set to a comma- delimited list of numbers corresponding to nodes that are to be shown expanded when the outline is first displayed. The calcBlockState() function is invoked for each parent element. The element s location is compared against values in the EXPANSIONSTATE element, if there are any, and returns the appropriate 1 or 0value for the state string being assembled for the rendered outline.
services for high quality webhost to host and run your jsp applications.