// to avoid memory leaks!
XSDocumentInfo (Element schemaRoot, XSAttributeChecker attrChecker, SymbolTable symbolTable)
throws XMLSchemaException {
fSchemaElement = schemaRoot;
fNamespaceSupport = new SchemaNamespaceSupport(schemaRoot, symbolTable);
fNamespaceSupport.reset();
fIsChameleonSchema = false;
fSymbolTable = symbolTable;
fAttrChecker = attrChecker;
if (schemaRoot != null) {
Element root = schemaRoot;
fSchemaAttrs = attrChecker.checkAttributes(root, true, this);
// schemaAttrs == null means it's not an <xsd:schema> element
// throw an exception, but we don't know the document systemId,
// so we leave that to the caller.
if (fSchemaAttrs == null) {
throw new XMLSchemaException(null, null);
}
fAreLocalAttributesQualified =
((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_AFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
fAreLocalElementsQualified =
((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_EFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
fBlockDefault =
((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_BLOCKDEFAULT]).shortValue();
fFinalDefault =
((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_FINALDEFAULT]).shortValue();
fTargetNamespace =
(String)fSchemaAttrs[XSAttributeChecker.ATTIDX_TARGETNAMESPACE];
if (fTargetNamespace != null)
fTargetNamespace = symbolTable.addSymbol(fTargetNamespace);
fNamespaceSupportRoot = new SchemaNamespaceSupport(fNamespaceSupport);
//set namespace support
fValidationContext.setNamespaceSupport(fNamespaceSupport);
fValidationContext.setSymbolTable(symbolTable);
// pass null as the schema document, so that the namespace