int n; // compute # of items into this value.
if(lf!=null) {
n = lf.length;
} else {
MaxLengthFacet xlf = (MaxLengthFacet)dti.getFacetObject(XSDatatype.FACET_MAXLENGTH);
int max = (xlf!=null)?xlf.maxLength:16;
MinLengthFacet nlf = (MinLengthFacet)dti.getFacetObject(XSDatatype.FACET_MINLENGTH);
int min = (nlf!=null)?nlf.minLength:0;
n = random.nextInt(max-min)+min;