aspose file tools
The moose likes XML and Related Technologies and the fly likes XSD constraint based on tag value Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "XSD constraint based on tag value" Watch "XSD constraint based on tag value" New topic
Author

XSD constraint based on tag value

Bala Gangadhar
Ranch Hand

Joined: Oct 07, 2008
Posts: 66
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: XSD constraint based on tag value
 
Similar Threads
auth constraint tags
Writting XSD (dynamic??)
Error while using (user-data-constraint) tag(web Security)
Query on use of inheritance using restriction
For all SCWCD guys : Doubts