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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation of dependent elements with schema ?

Status
Not open for further replies.

frafunzele

Programmer
Joined
Jul 1, 2004
Messages
1
Location
DE
Hi !

Is it possible to validate dependent elements in a XML document by a schema ?

Example:
If element VALUE exist then element NAME is mandatory.

O.K. its possible to implement this with CHOICE, but what happens if CHOICE is not possible or it is too wasteful ?

Example:
If element VALUE is odd then element NAME is mandatory.
Or - more complicate - in this case element NAME has to start with letter D.

The best solution should be a general solution like a script language where you have access to all individual XML elements.

Thx, Frafunzele (using Visual Studio and c#)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top