public XSDHandler (XSGrammarBucket gBucket, short schemaVersion, XSConstraints xsConstraints) { this(schemaVersion, xsConstraints); fGrammarBucket = gBucket; // Note: don't use SchemaConfiguration internally // we will get stack overflaw because // XMLSchemaValidator will be instantiating XSDHandler... fSchemaGrammarDescription = new XSDDescription(); } // end constructor
public XSDDescription makeClone() { XSDDescription desc = new XSDDescription(); desc.fAttributes = this.fAttributes; desc.fBaseSystemId = this.fBaseSystemId; desc.fContextType = this.fContextType; desc.fEnclosedElementName = this.fEnclosedElementName; desc.fExpandedSystemId = this.fExpandedSystemId; desc.fLiteralSystemId = this.fLiteralSystemId; desc.fLocationHints = this.fLocationHints; desc.fPublicId = this.fPublicId; desc.fNamespace = this.fNamespace; desc.fTriggeringComponent = this.fTriggeringComponent; return desc; }
private boolean canAddComponents(Vector components) { final int size = components.size(); final XSDDescription desc = new XSDDescription(); for (int i=0; i<size; i++) { XSObject component = (XSObject) components.elementAt(i); if (!canAddComponent(component, desc)) { return false; } } return true; }
private void addGlobalComponents(Vector components, Hashtable importDependencies) { final XSDDescription desc = new XSDDescription(); final int size = components.size(); for (int i=0; i<size; i++) { addGlobalComponent((XSObject) components.elementAt(i), desc); } updateImportDependencies(importDependencies); }
private boolean existingGrammars(Vector grammars) { int length = grammars.size(); final XSDDescription desc = new XSDDescription(); for (int i=0; i < length; i++) { final SchemaGrammar sg1 = (SchemaGrammar)grammars.elementAt(i); desc.setNamespace(sg1.getTargetNamespace()); final SchemaGrammar sg2 = findGrammar(desc, false); if (sg2 != null) { return true; } } return false; }
private void addGrammars(Vector grammars) { int length = grammars.size(); XSDDescription desc = new XSDDescription(); for (int i=0; i < length; i++) { final SchemaGrammar sg1 = (SchemaGrammar)grammars.elementAt(i); desc.setNamespace(sg1.getTargetNamespace()); final SchemaGrammar sg2 = findGrammar(desc, fNamespaceGrowth); if (sg1 != sg2) { addGrammarComponents(sg1, sg2); } } }
XSDDescription desc = new XSDDescription(); desc.fContextType = XSDDescription.CONTEXT_PREPARSE; desc.setBaseSystemId(source.getBaseSystemId());
while(nsiter.hasNext()) XSDDescription desc = new XSDDescription(); desc.setNamespace((String)nsiter.next()); Grammar oldGrammar = pool.removeGrammar(desc); XSDDescription description = new XSDDescription(); description.setNamespace(targetNamespace); pool.removeGrammar(description); while(nsiter.hasNext()) XSDDescription desc = new XSDDescription(); desc.setNamespace((String)nsiter.next()); pool.removeGrammar(desc);
fGrammarDescription = new XSDDescription(); fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE; fGrammarDescription.setNamespace(SchemaSymbols.URI_SCHEMAFORSCHEMA); fGrammarDescription = new XSDDescription(); fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE; fGrammarDescription.setNamespace(SchemaSymbols.URI_XSI);
fGrammarDescription = new XSDDescription(); fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE; fGrammarDescription.setNamespace(SchemaSymbols.URI_SCHEMAFORSCHEMA);