M
Mike
In my XML document, I am defining a key on an element, which works fine. I
also have the corresponding keyref element in place to enforce ref.
integrity.
The issue: it's not necessary that an entity have a parent. But, if a parent
ID is specified I want to validate that against the key. For example:
<Objects>
<Object>
<ID>1</ID>
<ParentID/>
</Object>
<Object>
<ID>2</ID>
<ParentID>1</ParentID>
</Object>
</Objects>
In this example, object ID "2" is a child of "1". Since "1" is the parent,
I don't need to validate ParentID (i.e. when it doesn't have a value, don't
validate with keyref).
Any ways around this?
Thanks.
also have the corresponding keyref element in place to enforce ref.
integrity.
The issue: it's not necessary that an entity have a parent. But, if a parent
ID is specified I want to validate that against the key. For example:
<Objects>
<Object>
<ID>1</ID>
<ParentID/>
</Object>
<Object>
<ID>2</ID>
<ParentID>1</ParentID>
</Object>
</Objects>
In this example, object ID "2" is a child of "1". Since "1" is the parent,
I don't need to validate ParentID (i.e. when it doesn't have a value, don't
validate with keyref).
Any ways around this?
Thanks.