<Container>
<MyObject>
<property1>abcd</property1>
<property2>
<Version>3.2</Version>
</property2>
</MyObject>
<Contained>
<MyObject>
<property1>something</property1>
<property2>
<Version>1.1</Version>
<Version>1.2</Version>
<Version>1.6</Version>
</property2>
</MyObject>
<MyObject>
<property1>something else</property1>
<property2>
<Version>2.3</Version>
<Version>2.5</Version>
<Version>2.6</Version>
</property2>
</MyObject>
</Contained>
</Container>
Given this xml structure, in the corresponding xsd file, can I put a max occurs limit on Version property, such that if MyObject is directly contained in Container, it should occur exactly one time, but if MyObject is contained in Contained, then it may occur any number of times?
Based on a similar question, I am inclined to think it it not possible, but I would like to be sure.