But you answer your question, yes this format can be expressed with XML-Schema:
<xsd:element name="dict"> <xsd:complexType> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:element name="key" type="xsd:string" /> <xsd:choice> <xsd:element name="string" type="xsd:string" /> <xsd:element name="integer" type="xsd:integer" /> <!-- etc. --> </xsd:choice> </xsd:sequence> </xsd:complexType> </xsd:element>
grammar { start = Dict Dict = element dict { DictItem* } DictItem = element key { text }, (element string { text } | element number { xsd:integer }) }
But you answer your question, yes this format can be expressed with XML-Schema: