Designer 10.7 | webMethods Service Development Help | Properties | Schema Component Properties | Attribute Declaration
 
Attribute Declaration
An attribute declaration associates an attribute name with a simple type definition. This symbol corresponds to the XML Schema <attribute> declaration or the attribute in a DTD ATTLIST declaration.
An attribute declaration can specify a default value, a fixed value, and whether the appearance of the attribute in the instance document is required. Like element declarations, attribute declarations can be global or local.
This field...
Specifies...
Name
The local name and target namespace of the attribute declaration. The Name value is equal to the expanded value (prefix plus local name) of the name attribute in the attribute declaration.
Default
The default value for the attribute in an instance document. The Default value is equal to the value of the default attribute in the attribute declaration. During data validation, Integration Server supplies the instance document with an attribute whose value equals that of Default if:
*The element to which the attribute is assigned appears in the instance document, and
*The attribute itself does not appear.
If the element to which the attribute declaration is assigned does not appear in the instance document, Integration Server does not augment the instance document.
Note:
During data validation, Integration Server applies the Default value for an attribute declaration differently than the Default value for an element declaration. For attributes, Integration Server supplies the instance document with an attribute with the Default value when the attribute does not appear in the instance document. For elements, Integration Server supplies the instance document with an element equal to the Default value only if the element appears in the instance document, but has no content.
Fixed Value
The fixed value for the attribute. The Fixed Value is equal to the value of the fixed attribute in the attribute declaration. If this attribute appears in an instance document, the attribute value must equal the Fixed Value. During data validation, Integration Server supplies the instance document with an attribute whose value equals Fixed Value if:
*The element to which the attribute is assigned appears in the instance document, and
*The attribute itself does not appear in the instance document.
Is Required
Whether or not the attribute must appear in an instance document. Is Required is determined by the value of the use attribute in the attribute declaration. This field only appears when you select a local attribute declaration or an attribute reference. The Is Required field can have one of the following values:
*True specifies that the attribute is required and must appear in the instance document. When the value of Is Required is True, the attribute declaration contains use="required".
*False specifies that the appearance of the attribute in the instance document is optional; that is, the attribute is not required. When the value of Is Required is False, the attribute declaration or use=“optional” or the use attribute is absent from the declaration.
If an attribute declaration in an XML Schema contains use=”prohibited”, the attribute declaration does not appear in the schema browser. Integration Server does not retain attribute declarations whose use is prohibited.
Simple Type
The name and namespace of the simple type definition associated with the attribute. See Simple Type Definition.