public boolean allowExpandedName(XSWildcardDecl wildcard, QName curElem, SubstitutionGroupHandler subGroupHandler, XSElementDeclHelper eDeclHelper) { if (wildcard.allowQName(curElem)) { if (wildcard.fDisallowedDefined && eDeclHelper.getGlobalElementDecl(curElem) != null) { return false; } return true; } return false; } public List getDefinedNames(SubstitutionGroupHandler subGroupHandler) {
public XSElementDecl getMatchingElemDecl(QName element, XSElementDecl exemplar, short schemaVersion) { if (element.localpart == exemplar.fName && element.uri == exemplar.fTargetNamespace) { return exemplar; } // if the exemplar is not a global element decl, then it's not possible // to be substituted by another element. if (exemplar.fScope != XSConstants.SCOPE_GLOBAL) { return null; } // if the decl blocks substitution, return false if ((exemplar.fBlock & XSConstants.DERIVATION_SUBSTITUTION) != 0) { return null; } // get the decl for the element XSElementDecl eDecl = fXSElementDeclHelper.getGlobalElementDecl(element); if (eDecl == null) { return null; } // and check by using substitutionGroup information if (substitutionGroupOK(eDecl, exemplar, exemplar.fBlock, schemaVersion)) { return eDecl; } return null; }
public boolean allowExpandedName(XSWildcardDecl wildcard, QName curElem, SubstitutionGroupHandler subGroupHandler, XSElementDeclHelper eDeclHelper) { if (wildcard.allowQName(curElem)) { if (wildcard.fDisallowedSibling && findMatchingElemDecl(curElem, subGroupHandler) != null) { return false; } if (wildcard.fDisallowedDefined && eDeclHelper.getGlobalElementDecl(curElem) != null) { return false; } return true; } return false; }
public boolean allowExpandedName(XSWildcardDecl wildcard, QName curElem, SubstitutionGroupHandler subGroupHandler, XSElementDeclHelper eDeclHelper) { if (wildcard.allowQName(curElem)) { if (wildcard.fDisallowedSibling && findMatchingElemDecl(curElem, subGroupHandler) != null) { return false; } if (wildcard.fDisallowedDefined && eDeclHelper.getGlobalElementDecl(curElem) != null) { return false; } return true; } return false; }