// content attribute is defined. It either points to an XHTML file, or
// an introContent.xml file. Process each case. Assume it is an
// introContent file.
// INTRO: XHTML file is loaded needlessly when we have XHTML content and
// SWT presentation.
IntroContentParser parser = new IntroContentParser(content);
Document dom = parser.getDocument();
if (dom == null) {
// bad xml. This could be bad XHTML or bad intro XML. Parser would
// have logged fact. Load dom for invalid page, and make sure to
// force an extract on parent folder to enabling jarring.
Bundle introBundle = Platform.getBundle(IIntroConstants.PLUGIN_ID);
ModelUtil.ensureFileURLsExist(introBundle, INVALID_CONTENT);
String invalidContentFilePath = BundleUtil
.getResolvedResourceLocation(INVALID_CONTENT, introBundle);
parser = new IntroContentParser(invalidContentFilePath);
dom = parser.getDocument();
// make sure to override all attributes to resolve the Invalid
// Page page correctly.
content = invalidContentFilePath;
this.base = INVALID_CONTENT_BASE;
setBundle(introBundle);
}
// parse content depending on type. Make sure to set the loaded flag
// accordingly, otherwise content file will always be parsed.
if (parser.hasXHTMLContent()) {
loadXHTMLContent(dom);
// make sure to use correct base.
init(element, getBundle(), initialBase);
super.loadChildren();
} else