Attributes (XSM)

Attributes can be created under elements or complex types or directly at the root or in an attribute group for reuse.

There are global and local attributes:

Note: In a model targeted with the XML-Data Reduced language, local attributes are first declared separately, like global attributes (with the <AttributeType> tag and a name attribute), then within their parent element (with the <attribute> tag and a type attribute).

Extract of an XDR file:



In a model targeting XSD, you can derive an attribute data type to extend or restrict its values. For example:



Generated schema: