[xsd-users] Evaluating XSD - XML format question
Boris Kolpackov
boris at codesynthesis.com
Mon Aug 9 09:52:59 EDT 2010
Hi Tom,
To add to Bertwim's reply, if you want to allow both attributes and
elements in your MyMessage element, then your schema would have to
look like this:
<xsd:complexType name="MyMessageType">
<xsd:sequence>
<xsd:element name="p1" type="xsd:long" minOccurs="0"/>
<xsd:element name="p2" type="xsd:long" minOccurs="0"/>
<xsd:element name="p3" type="xsd:long" minOccurs="0"/>
<xsd:element name="p4" type="xsd:float" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="p1" type="xsd:long"/>
<xsd:attribute name="p2" type="xsd:long"/>
<xsd:attribute name="p3" type="xsd:long"/>
<xsd:attribute name="p4" type="xsd:float"/>
</xsd:complexType>
Boris
More information about the xsd-users
mailing list