Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml maxOccurs=”的XSD选择元素;无界的;包含maxOccurs=”的元素;1“;_Xml_Xsd_Exchangewebservices - Fatal编程技术网

Xml maxOccurs=”的XSD选择元素;无界的;包含maxOccurs=”的元素;1“;

Xml maxOccurs=”的XSD选择元素;无界的;包含maxOccurs=”的元素;1“;,xml,xsd,exchangewebservices,Xml,Xsd,Exchangewebservices,在此示例中(来自Exchange Web Services XSD) 这是否意味着一个有效的XML可以有UnknownAttendeeConflictData,IndividualAttendeeConflictData,TooBigGroupAttendeeConflictData和GroupAttendeeConflictData,但每个XML只能有一个实例在xs:choice的子项上,将不禁止xsd:choice的子项出现多次 xsd:choice上的maxOccurs=“unboun

在此示例中(来自Exchange Web Services XSD)



这是否意味着一个有效的XML可以有
UnknownAttendeeConflictData
IndividualAttendeeConflictData
TooBigGroupAttendeeConflictData
GroupAttendeeConflictData
,但每个XML只能有一个实例在
xs:choice
的子项上,将禁止
xsd:choice
的子项出现多次

xsd:choice
上的
maxOccurs=“unbounded”
表示可以有无限数量的选项。对于每个这样的选择,由于
maxoccurrences=“1”
,XML文档将能够出现一次,但下一次可能会由于
xsd:choice/@maxoccurrences=“unbounded”
而重复。因此,作为
xsd:choice/@maxoccurrences=“unbounded”
的子元素列出的那些元素将能够以任何顺序出现多次

如果作为XSD作者,您希望这些元素以任何顺序出现一次,请考虑使用<代码> xSD:所有。还要注意的是,明确列出它们并不是必需的

 <xs:complexType name="ArrayOfAttendeeConflictData">
     <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element minOccurs="1" maxOccurs="1" name="UnknownAttendeeConflictData" nillable="true" type="t:UnknownAttendeeConflictData" />
         <xs:element minOccurs="1" maxOccurs="1" name="IndividualAttendeeConflictData" nillable="true" type="t:IndividualAttendeeConflictData" />
        <xs:element minOccurs="1" maxOccurs="1" name="TooBigGroupAttendeeConflictData" nillable="true" type="t:TooBigGroupAttendeeConflictData" />
        <xs:element minOccurs="1" maxOccurs="1" name="GroupAttendeeConflictData" nillable="true" type="t:GroupAttendeeConflictData" />
     </xs:choice>
 </xs:complexType>