Default and Fixed Values for Simple Elements
4 years ago
Web Technology
Simple elements may have a default value OR a fixed value specified. A default value is automatically
assigned to the element when no other value is specified.
In the following example the default value is "red":
<xs:element name="color" type="xs:string" default="red"/>
A fixed value is also automatically assigned to the element, and you cannot specify another value.
In the following example the fixed value is "red":
<xs:element name="color" type="xs:string" fixed="red"/>
Rajiv Shah
Sep 30, 2021