public TagTypeDefinition getTagDefinition(XMLNode node) {
   String tagName = node.getFullTagName();
   TagTypeDefinition tagTypeDefinition = this.tags.get(tagName);
   if (node == null || tagTypeDefinition == null) {
     String nodeSchemaId = this.getSchemaURI(node);
     if (this.namespaceContainers.contains(nodeSchemaId)) {
       return new XSDPossibleRootsTagTypeDefinition(this.possibleRoots);
     } else {
       return EMPTY_POSSIBLE_ROOTS;
     }
   }
   return tagTypeDefinition != null ? tagTypeDefinition : new OnlyNameTypeTagDefinition(tagName);
 }