<xsd:element name="para">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="generic" type="xsd:string"/>
<xsd:element name="brand" type="xsd:string"/>
<xsd:element name="emph" type="xsd:string"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
The key components of this code are as follows:
The complexType needs an attribute of mixed="true". This allows mixed content. The addition of minOccurs="0" and maxOccurs="unbounded" attributes to the <xsd:choice> element. The occurrence indicators will allow any elements within <xsd:choice> to occur zero or more times in any order, giving you the flexibility to use more than one <generic>, <brand>, or <emph> tag within a paragraph, interspersed with text.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.