public final XSComplexTypeDecl getComplexTypeDecl(){ int chunk = fCTDeclIndex >> CHUNK_SHIFT; int index = fCTDeclIndex & CHUNK_MASK; ensureCTDeclCapacity(chunk); if (fCTDecl[chunk][index] == null) { fCTDecl[chunk][index] = new XSComplexTypeDecl(); } else { fCTDecl[chunk][index].reset(); } fCTDeclIndex++; return fCTDecl[chunk][index]; }
public XSElementDecl getGlobalElementDecl(QName element) { SchemaGrammar sGrammar = fGrammarBucket.getGrammar(element.uri); if (sGrammar != null) { return sGrammar.getGlobalElementDecl(element.localpart); } return null; }
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) {
private SchemaGrammar getSchemaGrammar(XSDDescription desc) { SchemaGrammar sg = findGrammar(desc, fNamespaceGrowth); if (sg == null) { sg = new SchemaGrammar(desc.getNamespace(), desc.makeClone(), fSymbolTable); fGrammarBucket.putGrammar(sg); } else if (sg.isImmutable()){ sg = createGrammarFrom(sg); } return sg; }
public final XSAttributeUseImpl getAttributeUse(){ int chunk = fAttributeUseIndex >> CHUNK_SHIFT; int index = fAttributeUseIndex & CHUNK_MASK; ensureAttributeUseCapacity(chunk); if (fAttributeUse[chunk][index] == null) { fAttributeUse[chunk][index] = new XSAttributeUseImpl(); } else { fAttributeUse[chunk][index].reset(); } fAttributeUseIndex++; return fAttributeUse[chunk][index]; }
public final XSModelGroupImpl getModelGroup(){ int chunk = fModelGroupIndex >> CHUNK_SHIFT; int index = fModelGroupIndex & CHUNK_MASK; ensureModelGroupCapacity(chunk); if (fModelGroup[chunk][index] == null) { fModelGroup[chunk][index] = new XSModelGroupImpl(); } else { fModelGroup[chunk][index].reset(); } fModelGroupIndex++; return fModelGroup[chunk][index]; }
public final XSElementDecl getElementDecl(){ int chunk = fElementDeclIndex >> CHUNK_SHIFT; int index = fElementDeclIndex & CHUNK_MASK; ensureElementDeclCapacity(chunk); if (fElementDecl[chunk][index] == null) { fElementDecl[chunk][index] = new XSElementDecl(); } else { fElementDecl[chunk][index].reset(); } fElementDeclIndex++; return fElementDecl[chunk][index]; }
public final XSAttributeDecl getAttributeDecl(){ int chunk = fAttrDeclIndex >> CHUNK_SHIFT; int index = fAttrDeclIndex & CHUNK_MASK; ensureAttrDeclCapacity(chunk); if (fAttrDecl[chunk][index] == null) { fAttrDecl[chunk][index] = new XSAttributeDecl(); } else { fAttrDecl[chunk][index].reset(); } fAttrDeclIndex++; return fAttrDecl[chunk][index]; }
public final XSParticleDecl getParticleDecl(){ int chunk = fParticleDeclIndex >> CHUNK_SHIFT; int index = fParticleDeclIndex & CHUNK_MASK; ensureParticleDeclCapacity(chunk); if (fParticleDecl[chunk][index] == null) { fParticleDecl[chunk][index] = new XSParticleDecl(); } else { fParticleDecl[chunk][index].reset(); } fParticleDeclIndex++; return fParticleDecl[chunk][index]; }
protected void typeSubsumption(XSComplexTypeDecl dType, XSComplexTypeDecl bType, XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter, SimpleLocator locator) { try { particleValidRestriction(dType.fParticle, SGHandler, bType.fParticle, SGHandler); } catch (XMLSchemaException e) { reportSchemaError(errorReporter, locator, e.getKey(), e.getArgs()); reportSchemaError(errorReporter, locator, "derivation-ok-restriction.5.4.2", new Object[]{dType.fName}); } }
private XSAttributeGroupDecl createAttrGrp() { XSWildcardDecl wildcard = new XSWildcardDecl(); wildcard.fProcessContents = XSWildcardDecl.PC_LAX; XSAttributeGroupDecl attrGrp = new XSAttributeGroupDecl(); attrGrp.fAttributeWC = wildcard; return attrGrp; }
private XSParticleDecl createAnyLaxWildcardParticle() { XSParticleDecl particle = new XSParticleDecl(); particle.fMinOccurs = 1; particle.fMaxOccurs = 1; particle.fType = XSParticleDecl.PARTICLE_WILDCARD; XSWildcardDecl anyWC = new XSWildcardDecl(); anyWC.fNamespaceList = null; anyWC.fType = XSWildcard.NSCONSTRAINT_ANY; anyWC.fProcessContents = XSWildcard.PC_LAX; particle.fValue = anyWC; return particle; } }
private XSParticleDecl createUnboundedAnyWildcardSequenceParticle() { XSParticleDecl particle = createUnboundedModelGroupParticle(); XSModelGroupImpl sequence = new XSModelGroupImpl(); sequence.fCompositor = XSModelGroupImpl.MODELGROUP_SEQUENCE; sequence.fParticleCount = 1; sequence.fParticles = new XSParticleDecl[1]; sequence.fParticles[0] = createAnyLaxWildcardParticle(); particle.fValue = sequence; return particle; }
boolean allowAttribute(XSWildcardDecl attrWildcard, QName name, SchemaGrammar grammar) { if (attrWildcard.allowQName(name)) { if (grammar == null || !attrWildcard.fDisallowedDefined) { return true; } return (grammar.getGlobalAttributeDecl(name.localpart) == null); } return false; }
public void findElemInTable(XSComplexTypeDecl type, XSElementDecl elem, SymbolHash elemDeclHash) throws XMLSchemaException { final XSElementDecl existingElem = findExistingElement(elem, elemDeclHash); // First time or is same element if (existingElem == null || existingElem == elem) { return; } if (elem.fType != existingElem.fType) { // Types are not the same throw new XMLSchemaException("cos-element-consistent", new Object[] {type.fName, elem.fName}); } }
public XSElementDecl getGlobalElementDecl(QName element) { final SchemaGrammar sGrammar = findSchemaGrammar( XSDDescription.CONTEXT_ELEMENT, element.uri, null, element, null); if (sGrammar != null) { return sGrammar.getGlobalElementDecl(element.localpart); } return null; }
private void initXPathProcessor() throws Exception { fXmlSchemaValidator = (XMLSchemaValidator) getProperty("http://apache.org/xml/properties/assert/validator"); fAbstrPsychopathImpl = new AbstractPsychoPathXPath2Impl(); fXpath2DynamicContext = fAbstrPsychopathImpl.initXPath2DynamicContext(fSchemaXSmodel, fAssertDocument, fAssertParams); } // initXPathProcessor
/** * Ends the value scope for the specified identity constraint. * * @param identityConstraint The identity constraint. */ public void endValueScopeFor(IdentityConstraint identityConstraint, int initialDepth) { ValueStoreBase valueStore = fValueStoreCache.getValueStoreFor(identityConstraint, initialDepth); valueStore.endValueScope(); } // endValueScopeFor(IdentityConstraint)
/** * Start the value scope for the specified identity constraint. This * method is called when the selector matches in order to initialize * the value store. * * @param identityConstraint The identity constraint. */ public void startValueScopeFor(IdentityConstraint identityConstraint, int initialDepth) { ValueStoreBase valueStore = fValueStoreCache.getValueStoreFor(identityConstraint, initialDepth); valueStore.startValueScope(); } // startValueScopeFor(IdentityConstraint identityConstraint)
public XSElementDecl getGlobalElementDecl(QName name) { SchemaGrammar sg = gb.getGrammar(name.uri); return sg != null ? sg.getGlobalElementDecl(name.localpart) : null; }