XSD 1.0
As you suspect, there is no way in XSD 1.0 to globally declare that an attribute may appear on all elements without in some way adjusting the declarations of those elements.
However, there are some alternatives to repeating a common attribute definition for every element:
- Define the common attribute, or attribute group, globally and
@ref
it from every element.
- Define a common type which includes the common attribute, and extend that
type by each type used by every element.
XSD 1.1
In XSD 1.1, you can specify a default attribute group via a defaultAttributes
declaration on the xsd:schema
element.