Is it possible for an attribute to reference its sibling attributes, that is, ones that exist in the same <style>?
For example,
<style name="Widget.A">
<item name="customBackground">something</item>
<item name="android:background">?customBackground</item>
</style>
will produce an error since the ? qualifier references only attributes which exist in applied theme, not within the same style.
This functionality is a necessity for my library in order for proper compatibility with all versions of Android.
No, the ? syntax only allows references attributes from the current theme. You would have to re-write your style to define that value in a custom theme.