xml - XSD Choice, not the same element again -


how possible use choice , set in group have choice minimum 2 elements, not twice same element????

example code:

 xs:group name="ports">   <xs:sequence>     <xs:choice minoccurs="2" maxoccurs="2">     <xs:element name="port1" minoccurs="0" maxoccurs="1">             <xs:complextype>             <xs:sequence>                 <xs:group ref="portarguments"/>             </xs:sequence>         </xs:complextype>     </xs:element>       <xs:element name="port2">             <xs:complextype>             <xs:sequence>                 <xs:group ref="portarguments"/>             </xs:sequence>         </xs:complextype>     </xs:element>      </xs:choice> 

another question: possible limit access of elements in group?? example: have other groups. group 1 should select element 1-3 of ports group. group 2 should select element 1-10 !! how can realize that?

in xsd 1.0, there no solution want, generic cases. have apply schematron constraints or move xsd 1.1.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -