Element child = DOMUtil.getFirstChildElement( content );
if (child != null) {
// traverse annotation if any
if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
XSAnnotationImpl annotation = traverseAnnotationDecl(child, attrs, false, schemaDoc);
switch (currentFacet) {
case XSSimpleType.FACET_MINLENGTH:
xsFacets.minLengthAnnotation = annotation;
break;
case XSSimpleType.FACET_MAXLENGTH:
xsFacets.maxLengthAnnotation = annotation;
break;
case XSSimpleType.FACET_MAXEXCLUSIVE:
xsFacets.maxExclusiveAnnotation = annotation;
break;
case XSSimpleType.FACET_MAXINCLUSIVE:
xsFacets.maxInclusiveAnnotation = annotation;
break;
case XSSimpleType.FACET_MINEXCLUSIVE:
xsFacets.minExclusiveAnnotation = annotation;
break;
case XSSimpleType.FACET_MININCLUSIVE:
xsFacets.minInclusiveAnnotation = annotation;
break;
case XSSimpleType.FACET_TOTALDIGITS:
xsFacets.totalDigitsAnnotation = annotation;
break;
case XSSimpleType.FACET_FRACTIONDIGITS:
xsFacets.fractionDigitsAnnotation = annotation;
break;
case XSSimpleType.FACET_WHITESPACE:
xsFacets.whiteSpaceAnnotation = annotation;
break;
case XSSimpleType.FACET_LENGTH:
xsFacets.lengthAnnotation = annotation;
break;
}
child = DOMUtil.getNextSiblingElement(child);
}
else {
String text = DOMUtil.getSyntheticAnnotation(content);
if (text != null) {
XSAnnotationImpl annotation = traverseSyntheticAnnotation(content, text, attrs, false, schemaDoc);
switch (currentFacet) {
case XSSimpleType.FACET_MINLENGTH:
xsFacets.minLengthAnnotation = annotation;
break;
case XSSimpleType.FACET_MAXLENGTH: