String tmp = null;
Element elem = DomUtils.getChildElementByName(document.getDocumentElement(), "jsp-tag-config");
if(elem == null)
return new JspTagConfig();
tmp = DomUtils.getChildElementText(elem, "doctype");
if(tmp != null) {
if(tmp.equals("html4-loose"))
docType = DocType.HTML4_LOOSE;
else if(tmp.equals("html4-loose-quirks"))
docType = DocType.HTML4_LOOSE_QUIRKS;
else if(tmp.equals("xhtml1-transitional"))
docType = DocType.XHTML1_TRANSITIONAL;
}
tmp = DomUtils.getChildElementText(elem, "id-javascript");
if(tmp != null) {
if(tmp.equals("default"))
idJavascript = IdJavascript.DEFAULT;
else if(tmp.equals("legacy"))
idJavascript = IdJavascript.LEGACY;
else if(tmp.equals("legacyOnly"))
idJavascript = IdJavascript.LEGACY_ONLY;
}
treeImageLocation = DomUtils.getChildElementText(elem, "tree-image-location");
treeRendererClass = DomUtils.getChildElementText(elem, "tree-renderer-class");
return new JspTagConfig(docType, idJavascript, treeImageLocation, treeRendererClass);
}