// An error for 'length' and 'maxLength' to be specified at the same time
// except if the base type had the same value for 'maxLength' also
XmlAnySimpleType baseMaxLength = baseImpl.getFacet(SchemaType.FACET_MAX_LENGTH);
if (!(baseMaxLength != null &&
baseMaxLength.valueEquals(myFacets[SchemaType.FACET_MAX_LENGTH]) &&
baseMaxLength.compareValue(len) >= 0))
{
state.error(XmlErrorCodes.DATATYPE_LENGTH, null, facet);
continue;
}
}