Infopath recognize "choice" instead of "sequence" in an xml schema

O

olivier

Is someone able to explain to me if Infopath is right to recognize a "choice"
instead of a "sequence" in the following XML schema for "Correspondants" ?
Xmlspy does recognize "Correspondants" as a sequence. Infopath change from
"choice" to "sequence" only if the "minoccurs" attributes are removed for the
"Correspondants" elements (Nom, Organisme...)

<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSPY v2004 rel. 3 U (http://www.xmlspy.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="IdentificationSystemeType">
<xs:sequence>
<xs:element name="NomDetaille" type="xs:string"/>
<xs:element name="InformationsDiverses" type="xs:string"/>
<xs:element name="Correspondants">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Organisme" type="xs:string" minOccurs="0"/>
<xs:element name="Nom" type="xs:string" minOccurs="0"/>
<xs:element name="Telephone" type="xs:string" minOccurs="0"/>
<xs:element name="Telecopie" type="xs:string" minOccurs="0"/>
<xs:element name="Mail" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GestionFicheType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Date" type="xs:date"/>
<xs:element name="Edition" type="xs:string"/>
<xs:element name="Objet" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="FicheSysteme">
<xs:complexType>
<xs:sequence>
<xs:element name="IdentificationSysteme"
type="IdentificationSystemeType"/>
<xs:element name="GestionFiche" type="GestionFicheType"/>
</xs:sequence>
<xs:attribute name="nom" type="xs:string" use="required"/>
<xs:attribute name="version" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
 
V

virgul

Hi,

I have the same probleme a you I believe It's a bug only things to do
is open the schema that have create infopath and edit it!!! After that
work


++

Thierry
 
B

Brian Teutsch [MSFT]

I'm far, far from a schema expert, but your XSD doesn't define
"Correspondants" as having a minOccurs of 0, but rather says that 0
subelements are required. So the proper InfoPath control is a choice, where
you can swap them around, not a sequence, would let you insert the group
multiple times.

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top