I found a better answer with the help of this posting. Apparently attributes can have multiple formats which makes the following code valid and can work for me.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="min_val" format="float|integer|reference" />
<attr name="max_val" format="float|integer|reference" />
<declare-styleable name="IntEditView">
<attr name="Caption" format="string|reference" />
<attr name="min_val" />
<attr name="max_val" />
</declare-styleable>
<declare-styleable name="FloatEditView">
<attr name="min_val" />
<attr name="max_val" />
</declare-styleable>
</resources>
Thank you everyone