type = ( (XSElementDecl) xs ).getType().asSimpleType();
}
if ( type != null )
{
final XSFacet length = type.getFacet( XSFacet.FACET_LENGTH );
final XSFacet maxLength = type.getFacet( XSFacet.FACET_MAXLENGTH );
final XSFacet fractionDigits = type.getFacet( XSFacet.FACET_FRACTIONDIGITS );
final XSFacet totalDigits = type.getFacet( XSFacet.FACET_TOTALDIGITS );
if ( length != null )
{
col.setLength( new Integer( length.getValue().value ) );
columnEmpty = false;
}
else if ( maxLength != null )
{
col.setLength( new Integer( maxLength.getValue().value ) );
columnEmpty = false;
}
if ( fractionDigits != null )
{
col.setScale( new Integer( fractionDigits.getValue().value ) );
columnEmpty = false;
}
if ( totalDigits != null )
{
col.setPrecision( new Integer( totalDigits.getValue().value ) );
columnEmpty = false;
}
if ( this.getSchemaSimpleType( type, "decimal" ) != null
&& ( col.getScale() == null || col.getPrecision() == null ) )