private void buildOutlineElement(Node node, String lineEnding, StringBuffer buf, int max_style_depth) {
		indent(node, buf);
		
		// Calculate CSS Class
		String cssClass = "";
		if (node.isLeaf()) {
			if (node.isComment()) {
				cssClass = CSS_LEAF_COMMENT;
			} else {
				cssClass = CSS_LEAF;
			}
		} else {
			if (node.isComment()) {
				cssClass = CSS_BRANCH_COMMENT;
			} else {
				cssClass = CSS_BRANCH;
			}
		}
		
		if (node.getDepth() <= max_style_depth) {
			cssClass = cssClass + node.getDepth();
		}
		
		
		buf.append("<div class=\"").append(cssClass).append("\">").append(XMLTools.escapeHTML(node.getValue())).append(lineEnding);
		
		if (!node.isLeaf()) {
			for (int i = 0; i < node.numOfChildren(); i++) {
				buildOutlineElement(node.getChild(i), lineEnding, buf, max_style_depth);
			}
		}
		indent(node, buf);
		buf.append("</div>").append(lineEnding);
	}