It is the <xsd:choice> that must be unbounded here. You correct schema should look like this:
<xsd:element name="foo">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="p"/>
<xsd:element ref="f"/>
<xsd:element ref="summary"/>
</xsd:choice>
<xsd:attribute ref="type"/>
</xsd:complexType>
</xsd:element>
Setting maxOccurs="unbounded"
by each element (p
, f
, summary
) won't make any difference here. It just allows you to repeat the same element many times, but not mix with others.