com.sun.org.apache.xerces.internal.xs.XSElementDeclaration

Here are the examples of the java api class com.sun.org.apache.xerces.internal.xs.XSElementDeclaration taken from open source projects.

1. XSModelImpl#buildSubGroups()

Project: openjdk
File: XSModelImpl.java
private SymbolHash buildSubGroups() {
    SubstitutionGroupHandler sgHandler = new SubstitutionGroupHandler(null);
    for (int i = 0; i < fGrammarCount; i++) {
        sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups());
    }
    final XSObjectListImpl elements = getGlobalElements();
    final int len = elements.getLength();
    final SymbolHash subGroupMap = new SymbolHash(len * 2);
    XSElementDecl head;
    XSElementDeclaration[] subGroup;
    for (int i = 0; i < len; i++) {
        head = (XSElementDecl) elements.item(i);
        subGroup = sgHandler.getSubstitutionGroup(head);
        subGroupMap.put(head, subGroup.length > 0 ? new XSObjectListImpl(subGroup, subGroup.length) : XSObjectListImpl.EMPTY_LIST);
    }
    return subGroupMap;
}

2. XSModelImpl#buildSubGroups_Org()

Project: openjdk
File: XSModelImpl.java
private SymbolHash buildSubGroups_Org() {
    SubstitutionGroupHandler sgHandler = new SubstitutionGroupHandler(null);
    for (int i = 0; i < fGrammarCount; i++) {
        sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups());
    }
    final XSNamedMap elements = getComponents(XSConstants.ELEMENT_DECLARATION);
    final int len = elements.getLength();
    final SymbolHash subGroupMap = new SymbolHash(len * 2);
    XSElementDecl head;
    XSElementDeclaration[] subGroup;
    for (int i = 0; i < len; i++) {
        head = (XSElementDecl) elements.item(i);
        subGroup = sgHandler.getSubstitutionGroup(head);
        subGroupMap.put(head, subGroup.length > 0 ? new XSObjectListImpl(subGroup, subGroup.length) : XSObjectListImpl.EMPTY_LIST);
    }
    return subGroupMap;
}

3. XSDHandler#expandRelatedElementComponents()

Project: openjdk
File: XSDHandler.java
private void expandRelatedElementComponents(XSElementDeclaration decl, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);
    /*final XSTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
        if (enclosingType != null) {
            addRelatedType(enclosingType, componentList, namespace, dependencies);
        }*/
    final XSElementDeclaration subElemDecl = decl.getSubstitutionGroupAffiliation();
    if (subElemDecl != null) {
        addRelatedElement(subElemDecl, componentList, namespace, dependencies);
    }
}