When creating a complex type that will define such an element, you must declare that the content will be mixed.
File: Schema.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.java2java.com" xmlns="http://www.java2java.com"
elementFormDefault="qualified">
<xsd:complexType name="paragraph" mixed="true">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="length" type="xsd:string" />
</xsd:complexType>
<xsd:element name="description" type="paragraph" />
</xsd:schema>
File: Data.xml
<description xmlns="http://www.java2java.com" length="short">The
<name>tiger</name>
world.
</description>
|