• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSD constraint based on tag value

 
Bala Gangadhar
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am defining an xsd.
I have a xml tag <CCtype> which accepts one of the enumarated values.
And based on the value of <CCtype> i have to impose a constraint on another tag as mandatory or optional
for example if <CCtype> is Master card then <ccid> must be present and if <CCtype> is VISA then <ccid> is optional.

Can somebody suggest me how to implement this constraint..

Regards,
Bala.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic