Default and Fixed Values for Simple Elements

3 weeks ago

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 Bikram
Sep 30, 2021

Questions Bank

View all Questions

Top