Viewpoint Forums
Viewpoint Forums
Viewpoint XML Schema
Handle conditional tags in Schema|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Junior Member |
Hi
I am new to XML Schema and new to this forum. I have the following requirement. I have to validate tags present in an XML instance conditionally using a Schema. My actual requirement can be explained with the example given below. Say I have tags NAME, STATUS, SPOUSE_NAME, CHILDREN My Schema should work as follows. 1. NAME must be present. 2. STATUS must be present and it can take values MARRIED, UNMARRIED 3. If STATUS is MARRIED then * SPOUSE_NAME must be present * CHILDREN is optional 4. If CHILDREN is present then * SPOUSE_NAME must be present * STATUS must be present and it must be MARRIED 5. SPOUSE_NAME and CHILDREN can occur in any sequence 6. If STATUS is UNMARRIED then * SPOUSE_NAME must be absent * CHILDREN must be absent Can anybody help me in preparing a schema which validates all the above rules. Thanks in advance Sri |
||
|
|
Junior Member |
Hi Sri,
Have you got this issue resolved? I try to do something similiar and not sure how to do it. Thanks, Tonhu |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
Viewpoint XML Schema
Handle conditional tags in Schema
