Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to force attribute depending on the value of a different one

Status
Not open for further replies.

GeertVerhoeven

Technical User
Joined
Oct 7, 2001
Messages
142
Location
BE
Hi all,

I'm currently creating an XSD to validate my xml file. I wonder wheter it is possible to force a set of attributes depending on the value of a different attribute?

For example I have the following XML structure:

<charColumn columnName="" maxLength="" allowDbNull="" />
<numberColumn columnName="" size="" scale="" allowDbNull="" />


Since this structure doesn't work that easy I want to go to a the following structure:

<column columnName="" type="" ...>

Depending on the type attribute (number, char, datetime, ...) I want to have force different attributes. Is it possible to do this via an XSD?

All comments are welcome.

Geert

Geert Verhoeven
Consultant @ Ausy Belgium

My Personal Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top