Name

xs:complexContent

Synopsis

<xs:complexContent
  id = "ID"
  mixed = "( true | false )">
  <!-- ( xs:annotation?, (xs:restriction | xs:extension) ) -->
</xs:complexContent>

The xs:complexContent element is used inside xs:complexType elements to derive a new complex type from an existing complex type by restriction or extension. When deriving by extension, the mixed attribute must have the same value as the base type’s mixed attribute. When deriving by restriction, the mixed attribute can have the value false to disallow mixed content that would be allowed in the base type. It can have the value true only if the base type allows mixed content. In other words, a derived type can disallow mixed content that’s allowed in the base type, but cannot allow it if the base type doesn’t already allow it.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.