Search in sources :

Example 1 with ElementDecl

use of org.eclipse.wst.dtd.core.internal.saxparser.ElementDecl in project webtools.sourceediting by eclipse.

the class DTDModelBuilder method addAttlistAndContentModel.

private void addAttlistAndContentModel(DTD dtd, DTDFile dFile) {
    // System.out.println("addAttListAndCotentModel - dtd:" +
    // dtd.getName());
    Enumeration en = dtd.externalElements();
    while (en.hasMoreElements()) {
        Object e = en.nextElement();
        if (e instanceof ElementDecl) {
            DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get(((ElementDecl) e).getNodeName());
            if (dtdelement == null) {
                dtdelement = getFactory().createDTDElement();
                dtdFile.getDTDObject().add(dtdelement);
            }
            finishElementDecl(dtdelement, (ElementDecl) e);
        } else if (e instanceof Attlist) {
            processAttList((Attlist) e);
        }
    }
}
Also used : Enumeration(java.util.Enumeration) Attlist(org.eclipse.wst.dtd.core.internal.saxparser.Attlist) DTDElement(org.eclipse.wst.dtd.core.internal.emf.DTDElement) ElementDecl(org.eclipse.wst.dtd.core.internal.saxparser.ElementDecl)

Aggregations

Enumeration (java.util.Enumeration)1 DTDElement (org.eclipse.wst.dtd.core.internal.emf.DTDElement)1 Attlist (org.eclipse.wst.dtd.core.internal.saxparser.Attlist)1 ElementDecl (org.eclipse.wst.dtd.core.internal.saxparser.ElementDecl)1