* Test if the given typed value is in the right partition of the XSD type space.
* If this test passes then if the typed value has a legal lexical form for
* this type then it is a legal instance.
*/
public boolean isBaseTypeCompatible(LiteralLabel lit) {
XSTypeDefinition base = getFoundingType();
RDFDatatype litDT = lit.getDatatype();
if (litDT instanceof XSDDatatype) {
XSTypeDefinition litBase = ((XSDDatatype)litDT).getFoundingType();
return base.equals(litBase);
} else if (litDT == null && lit.language().equals("")) {
// Special RDF case, a plain literal is type compatible with and xsd:string-based type
return base.equals(XSDstring.typeDeclaration);