Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Schema extension Element

XML Schema extension Element


XML Schema Reference Manual Complete XML Schema Reference Manual


Definition and Usage

The extension element extends elements of simpleType or complexType.

Element Information

Syntax

id=ID

base=QName

any attributes

(annotation?,((group|all|choice|sequence)?,

((attribute|attributeGroup)*,anyAttribute?)))

(The ? symbol declares that within the extension element, the element can appear only zero or one time; the * symbol declares that the element can appear zero or more times.)

property Description
id Optional. Specifies a unique ID for the element.
base Required. Specifies the name of a built-in data type, simpleType, or complexType element.
xml:lang Optional. Specifies the language used in the content.

Example 1

The following example extends an existing simpleType by adding an attribute:

  

    

    

    

  

  xs:simpleContent

    

      

        xs:simpleType

          

            

            

          

        

      

    

  

Example 2

The following example extends an existing complexType element by adding three elements:

  xs:sequence

    

    

  

  xs:complexContent

    

      xs:sequence

        

        

        

      

    

  


XML Schema Reference Manual Complete XML Schema Reference Manual