xs:attribute
Defines an attribute. See more info at http://www.w3.org/TR/xmlschema11-1/#element-attribute.
An attribute by default displays the following properties when rendered in the diagram: default, fixed, use and type. Connectors to the attribute are drawn using dotted lines if the attribute use is optional. The attribute name is stroked out if prohibited.
Property Name | Description | Possible Value | Mentions |
---|---|---|---|
Name | Attribute name (always required) | Any NCName for global/local attributes, all declared attributes' QName for references | For all local or global attributes. If missing, will be displayed as '[attribute]' in the diagram. |
Is Reference | When set, the local attribute is a reference | true/false | For local attributes |
Type | Qualified name of a simple type | All global simple types and built-in simple types. In addition another 3 proposals are present: [anonymous restriction], [anonymous list], [anonymous union] for creating anonymous simple types more easily. | For all attributes. For references, the type is set to the referenced attribute. |
Default | Default value. When specified, an attribute is added by the schema processor (if it is missing from the instance XML document) and it is given this value. The default and fixed attributes are mutually exclusive. | Any string | For all local or global attributes. For references the value is from the referenced attribute. |
Fixed | When specified, the value of the attribute is fixed and must be equal to this value. The default and fixed attributes are mutually exclusive. | Any string | For all local or global attributes. For references the value is from the referenced attribute. |
Use | Possible usage of the attribute. Marking an attribute "prohibited" is useful to exclude attributes during derivations by restriction. | optional, required, prohibited | For local attributes |
Form | Specifies whether or not the attribute is qualified (must have a namespace prefix in the instance XML document). The default value for this attribute is specified by the attributeFormDefault attribute of the xs:schema document element. | unqualified/qualified | For local attributes |
Inheritable | Specifies if the attribute is inheritable. Inheritable attributes can be used by <alternative> element on descendant elements | true/false | For all local or global attributes. The default value is false. This property is available for XML Schema 1.1. |
Target Namespace | Specifies the target namespace for local attribute declarations. The namespace URI may be different from the schema target namespace. | Any URI | Setting a target namespace for local attribute is useful only when restricts attributes of a complex type that is declared in other schema with a different target namespace. This property is available for XML Schema 1.1. |
ID | The component ID | Any ID | For all attributes |
Component | The edited component name | Not editable property | For all attributes |
Namespace | The component namespace | Not editable property | For all attributes |
System ID | The component system ID | Not editable property | For all attributes |