← Prev in month
← Prev in thread
Next in thread →
Next in month →
Specifying Complex ID/Key/Unique reference Constraints Using XML schema
Hi All,
I'm new here, and I am looking for a solution to specify the following ID Constraint using XML schema:
Within the following xml:
<root>
<groupA>
<item id="a">
<item id="b">
<item id="c">
<item id="d">
</groupA>
<groupB>
<item id="e">
</groupB> <item id="f">
<item id="g">
<item id="h">
<groupC>
<reference refs="a b d"> <!-- correct, referencing only items in "groupA" ! -->
<reference refs="a d c e"> <!-- error, referencing not only items "groupA" but also in "groupB" ! -->
<groupC>As you can see from the comments, I would like to enforce a role that says:
the "refs" attribute in the "reference" element under the "groupC" element is a list of references, and they must reference the "id" attribute of the "item" element ONLY under the "groupA" element.
The biggest headache for me now is the "ONLY" thing, how to reflect this using XML schema? Could any one give me a hint? Thanks in Advance!
Regards,
Mike
Do You Yahoo!?
启用电邮帐号,领会雅虎通[身临其境聊电影]的动感魅力,还有网络摄像头+雅虎通收音机等你来拿
← Prev in month
← Prev in thread
Next in thread →
Next in month →