public boolean sameValueAs(LiteralLabel other) {
	if (other == null)
	    return false;
	if (!wellformed || !other.wellformed) {
	    if (!other.wellformed) {
		// Need to support this comparison in order for the WG tests on ill formed
		// literals to be testable using isIsomorphic to
		return lexicalForm.equals(other.lexicalForm)
		&& lang.toLowerCase().equals(other.lang.toLowerCase());
	    } else {
		return false;
	    }
	}
	if (dtype == null) {
	    // Plain literal
	    if (other.dtype == null || (other.dtype.equals(XSDDatatype.XSDstring))) {
		return lexicalForm.equals(other.lexicalForm) && lang.toLowerCase().equals(other.lang.toLowerCase());
	    } else {
		return false;
	    }
	} else {
	    // Typed literal
	    return dtype.isEqual(this, other);
	}
    }