if(tag.localName.equals("include")) return getStateFactory().includePattern(parent,tag);
final String role = tag.getAttribute(TREXNamespace,"role");
if("datatype".equals(role)) {
String namespaceURI = mapNamespace(tag.namespaceURI);
DataTypeVocabulary v = grammar.dataTypes.get(namespaceURI);
if(v==null) {
reportError( ERR_UNKNOWN_DATATYPE_VOCABULARY, tag.namespaceURI );
// put a dummy vocabulary into the map
// so that user will never receive the same error again.
grammar.dataTypes.put( tag.namespaceURI, new UndefinedDataTypeVocabulary() );
return new IgnoreState(); // recover by ignoring this element.
}
return v.createTopLevelReaderState(tag);
}
return super.createExpressionChildState(parent,tag);
}