2012-10-15 5 views
0
<Performance> 
    <grouping usingTarget="M/R" /> 
    <state code="test"/> 
    <state code="test2"/> 
</Performance> 

어떻게 나는이 그래서 단일 (필수) grouping 태그가 지정 될 수 있지만, 무제한 (제로) state 태그를 지정할 수 있습니다 다음에 대한 XML 스키마를 작성하려면 어떻게해야합니까 발생?XML 스키마 - 제한 태그는

현재 추가 그룹 태그가 허용됩니다.

<xsi:complexType name="PerformanceType"> 
    <xsi:choice minOccurs="1" maxOccurs="unbounded"> 
     <xsi:element ref="grouping" minOccurs="1" maxOccurs="1" /> 
     <xsi:element ref="client" /> 
    </xsi:choice> 
    </xsi:complexType> 

답변

0
<xs:complexType name="PerformanceType"> 
    <xs:sequence> 
     <xs:element ref="grouping" minOccurs="1" maxOccurs="1" /> 
     <xs:element ref="state" minOccurs="0" maxOccurs="unbounded" /> 
    </xs:sequence> 
</xs:complexType> 
+0

은 완벽 덕분에 일했다 – jax