Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enforce Dependencies Between Optional Elements?

 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the below xml schema section, is there any way to say that the 'remote-ejb-home' element is required ONLY if the 'ejb-version' element is present?

<xs:element name="object">
<xs:complexType>
<xs:sequence>
<xs:element ref="ejb-version" minOccurs="0" maxOccurs="1" />
<xs:element ref="remote-ejb-home" minOccurs="0" maxOccurs="1" />
<xs:element ref="jndi-name" minOccurs="0" maxOccurs="1" />
<xs:element ref="context-name" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>

Thanks a lot in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic