void processRootElementDeclQName(final javax.xml.namespace.QName rootElementDeclQName, final QName element) { String rootElementDeclNamespace = rootElementDeclQName.getNamespaceURI(); // Add namespace to symbol table, to make sure it's interned. // This namespace may be later compared with other values using ==. rootElementDeclNamespace = fSymbolTable.addSymbol(rootElementDeclNamespace); if (rootElementDeclNamespace != null && rootElementDeclNamespace.equals(XMLConstants.NULL_NS_URI)) { rootElementDeclNamespace = null; } final SchemaGrammar grammarForRootElement = findSchemaGrammar( XSDDescription.CONTEXT_ELEMENT, rootElementDeclNamespace, null, null, null); if (grammarForRootElement != null) { fCurrentElemDecl = grammarForRootElement.getGlobalElementDecl(rootElementDeclQName.getLocalPart()); } if (fCurrentElemDecl == null) { String declName = (rootElementDeclQName.getPrefix().equals(XMLConstants.DEFAULT_NS_PREFIX)) ? rootElementDeclQName.getLocalPart() : rootElementDeclQName.getPrefix()+":"+rootElementDeclQName.getLocalPart(); reportSchemaError("cvc-elt.1.a", new Object[] {declName}); } else { checkElementMatchesRootElementDecl(fCurrentElemDecl, element); } } // processRootElementDeclQName
void processRootTypeQName(final javax.xml.namespace.QName rootTypeQName) { String rootTypeNamespace = rootTypeQName.getNamespaceURI(); // Add namespace to symbol table, to make sure it's interned. // This namespace may be later compared with other values using ==. rootTypeNamespace = fSymbolTable.addSymbol(rootTypeNamespace); if (rootTypeNamespace != null && rootTypeNamespace.equals(XMLConstants.NULL_NS_URI)) { rootTypeNamespace = null; } if (SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(rootTypeNamespace)) { String rootLocalPart = rootTypeQName.getLocalPart(); if (isValidBuiltInTypeName(rootLocalPart)) { SchemaGrammar s4s = SchemaGrammar.getS4SGrammar(fSchemaVersion); fCurrentType = s4s.getGlobalTypeDecl(rootLocalPart); } } else { final SchemaGrammar grammarForRootType = findSchemaGrammar( XSDDescription.CONTEXT_ELEMENT, rootTypeNamespace, null, null, null); if (grammarForRootType != null) { fCurrentType = grammarForRootType.getGlobalTypeDecl(rootTypeQName.getLocalPart()); } } if (fCurrentType == null) { String typeName = (rootTypeQName.getPrefix().equals(XMLConstants.DEFAULT_NS_PREFIX)) ? rootTypeQName.getLocalPart() : rootTypeQName.getPrefix()+":"+rootTypeQName.getLocalPart(); reportSchemaError("cvc-type.1", new Object[] {typeName}); } } // processRootTypeQName
findSchemaGrammar( XSDDescription.CONTEXT_XSITYPE, typeName.uri,
? null : findSchemaGrammar( XSDDescription.CONTEXT_ATTRIBUTE, fTempQName.uri, element, fTempQName, attributes); if (attrWildcard == null || !allowAttribute(attrWildcard, fTempQName, grammar)) { findSchemaGrammar( XSDDescription.CONTEXT_ATTRIBUTE, fTempQName.uri,
findSchemaGrammar( XSDDescription.CONTEXT_XSITYPE, typeName.uri,
findSchemaGrammar( XSDDescription.CONTEXT_ELEMENT, element.uri,