XSD Attributes

wxdqz

New Member
Hi,

This is my XSD for Attributes here what i need is, if Name is present in my XML attribute then there should not be Data and Length, if Name is not there then i can have Data and Length (Length can be optional). How does it will be changed...

<xs:element name="VAR" maxOccurs ="unbounded">
<xs:complexType>
<xs:attribute name="Name" use ="required" type="xs:string" />
<xs:attribute name="Data" use ="required" type="xs:string" />
<xs:attribute name="Length" use ="optional" type="xs:integer" />
</xs:complexType>
</xs:element>
 
Back
Top