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

XML Schema redefine Element

XML Schema redefine Element


XML Schema Reference Manual Complete XML Schema Reference Manual


Definition and Usage

The redefine element allows simple and complex types, groups, and attribute groups obtained from external schema files to be redefined in the current schema.

Element Information

Syntax

id=ID

schemaLocation=anyURI

any attributes

(annotation|(simpleType|complexType|group|attributeGroup))*

property Description
id Optional. Specifies a unique ID for the element.
schemaLocation Required. A URI reference to the location of the schema document.
any attributes Optional. Specifies any other attributes with a non-schema namespace.

Example 1

The following example shows a schema, Myschama2.xsd, in which elements specified by Myschama1.xsd exist. The pname type is redefined. According to this schema, elements constrained by pname must end with a "country" element:

Myschema1.xsd:

  xs:sequence

    

    

  

Myschema2.xsd:

  

    xs:complexContent

      

        xs:sequence

          

        

      

    

  


XML Schema Reference Manual Complete XML Schema Reference Manual