Brett Zamir wrote:
> According to the schema in Data Forms,
> http://xmpp.org/extensions/xep-0004.html , <value/> should precede
> <option/>:
> 
>      <xs:sequence>
>        <xs:element name='desc' minOccurs='0' type='xs:string'/>
>        <xs:element name='required' minOccurs='0' type='empty'/>
>        <xs:element ref='value' minOccurs='0' maxOccurs='unbounded'/>
>        <xs:element ref='option' minOccurs='0' maxOccurs='unbounded'/>
>      </xs:sequence>
> 
> 
> 
> However, in the Pubsub spec, http://xmpp.org/extensions/xep-0060.html ,
> the examples (57, 128, 141) all show <value/> (expressing the default
> value in a list) after <option/>. I guess the schema needs to be changed
> then?

Option is defined thus:

  <xs:element name='option'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='value'/>
      </xs:sequence>
      <xs:attribute name='label' type='xs:string' use='optional'/>
    </xs:complexType>
  </xs:element>

So a field can be either of the following:

<field>
  <value/>
</field>

<field>
  <option>
    <value/>
  </option>
</field>

/psa

Reply via email to