I have an XSD and XML files that works 90% and is almost completed. For example, if I have this XML document.
<Family>
<Family_Client>
<ClientID>1234</ClientID>
</Family_Client>
<Loan>
<Family_Client>
<ClientID>1234</ClientID>
</Family_Client>
</Loan>
</Family>
Is it possible to manipulate the XSD (XML Schema) to make sure that the ClientID
in loan is the same as the clientID
above in Family_Client
?
Also, if there are multiple Family_Clients
, I want the Family_Client
in Loan
to also be the same. So example of this would be:
<Family>
<Family_Client>
<ClientID>1234</ClientID>
</Family_Client>
<Family_Client>
<ClientID>2345</ClientID>
</Family_Client>
<Loan>
<Family_Client>
<ClientID>1234</ClientID>
</Family_Client>
<Family_Client>
<ClientID>2345</ClientID>
</Family_Client>
</Loan>
</Family>
I would recommend changing the structure of your schema.
If each loan only belongs to a single family client then you should put it under that node. If you want to have multiple loans per client, put them under a Loans node