private Boolean checkWERestriction() { // Whether element name is allowed by the wildcard if (!allowName(eb.fTargetNamespace, eb.fName)) { return null; } // Skip wildcard in derived can't restrict element in base. if (wd.fProcessContents == XSWildcardDecl.PC_SKIP) { return Boolean.FALSE; } // Must be able to find a global decl. Otherwise wildcard in derived // can't restrict element in base. ed = getGlobalElementDecl(qname); if (ed == null) { return Boolean.FALSE; } // The global element decl must match the base element if (ed != eb && !checkEERestriction()) { return Boolean.FALSE; } // Good match. Subtract the name from the wildcard. wDNList.add(eb.fTargetNamespace); wDNList.add(eb.fName); return Boolean.TRUE; }
private boolean checkEWRestriction() { // 1 G is skip. if (wb.getProcessContents() == XSWildcardDecl.PC_SKIP) { return true; } qname.uri = ed.fTargetNamespace; qname.localpart = ed.fName; eb = getGlobalElementDecl(qname); if (eb == null) { // 2 G is lax and S is not skip. return wb.getProcessContents() == XSWildcardDecl.PC_LAX; } else { // 4 G and S are both Element Declarations and all of the following are true: return checkEERestriction(); } }
private boolean findElementInBase() { // for all edges in the base that leaves the base state // check whether it's an edge matching the base edge. // if it is, return the next state. indexb[0] = -1; while ((eb = base.nextElementTransition(b, bn, indexb)) != null) { // Base element edge, check whether it matches the derived element if (matchElementWithBaseElement()) { // If name matches, check type, nil, fixed etc. return checkEERestriction(); } } // No matching element edge, try wildcards. indexb[0] = -1; while ((wb = base.nextWildcardTransition(b, bn, indexb)) != null) { // Base wildcard edge, check whether it matches the derived element qname.uri = ed.fTargetNamespace; qname.localpart = ed.fName; if (base.allowExpandedName(wb, qname, sgh, this)) { // If name matches, check whether there is a matching global. return checkEWRestriction(); } } return false; }
return checkEERestriction(); return checkEERestriction();