SymbolTable fSymbolTable = null;
XSDocumentInfo (Document schemaDoc, XSAttributeChecker attrChecker, SymbolTable symbolTable)
throws XMLSchemaException {
fSchemaDoc = schemaDoc;
fNamespaceSupport = new SchemaNamespaceSupport();
fIsChameleonSchema = false;
fSymbolTable = symbolTable;
// During XML Schema traversal bind "xml" prefix to
// "http://www.w3.org/XML/1998/namespace"
// per Namespace Constraint: Prefix Declared (Namespaces in XML REC)
fNamespaceSupport.declarePrefix(symbolTable.addSymbol("xml"), symbolTable.addSymbol("http://www.w3.org/XML/1998/namespace"));
if(schemaDoc != null) {
Element root = DOMUtil.getRoot(schemaDoc);
Object[] schemaAttrs = 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 (schemaAttrs == null) {
throw new XMLSchemaException(null, null);
}
fAreLocalAttributesQualified =
((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_AFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
fAreLocalElementsQualified =
((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_EFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
fBlockDefault =
((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_BLOCKDEFAULT]).shortValue();
fFinalDefault =
((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_FINALDEFAULT]).shortValue();
fTargetNamespace =
(String)schemaAttrs[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