Reputation: 360
Is there a way in XML Schema to define/name a set of attributes that can be reused on many element definitions without cutting/pasting the whole attribute definition into each element definition?
For example, if I want three attributes on 20 different elements in my xsd, can I name these as a group somehow once and reference them without having to have the same full definition repeated as part of all 20 elements?
<xs:attribute name="lang" type="xs:string" use="required"/>
<xs:attribute name="page" type="xs:string"/>
<xs:attribute name="alphabet" type="xs:string"/>
Upvotes: 3
Views: 1078