XML technologies / XML Schema / XML Schema element reference / xs:simpleContent

(Excerpt from “XML Schema” by Eric van der Vlist)

Definition of a simple content model.

<xs:simpleContent
    id = xs:ID
    {beliebige Attribute mit einem Nicht-Schema-Namensraum}
    >
    Content: ((xs:annotation?), (xs:restriction | xs:extension))
</xs:simpleContent>

May occur within: xs:complexType (local definition), xs:complexType (global definition)

Description

This element defines a simple content model by deriving from a simple type or another complex type with simple content. It is not itself a component, since simple contents are unnamed, but declares the intention to define a simple content model by derivation.

The derivation method is determined not by element xs:simpleContent itself, but by the choice of child element: xs:restriction for derivation by restriction or xs:extension for derivation by extension.

Restrictions

None.

Example

<xs:element name="title">
    <xs:complexType>
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute ref="lang"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
</xs:element>

Attributes

id
Element ID according to W3C XML Schema.

   

 

 

 

back to top