Re: Nillable KeyRef element

Pardon me for resurrecting an old thread but I've not been able to find any
messages that indicate a resolution to the issue of potentially using a
nillable keyref element.  I have been struggling with this issue and have
many cases where a nillable keyref is appropriate.

I think of keyref elements as analogous to a foreign key field in a database
table.  In a database I could add a record to a foreign key table and leave
the foreign key field null.  The database would raise an exception if I
tried to place a value into the foreign key table that did not exist in the
primary key table but it would allow the insert.  Of course this is optional
behavior in most RDBMS.

It seems reasonable to enforce data validation on a keyref only if the
element contains a value.  Without that option it, the only solution I've
come up with is to insert a 'blank' record in the key'd list and let the
validation assume that is the record an empty keyref refers to.

>From the earlier response from Henry Thompson I read:

> If there isn't another way, then maybe the spec needs to change so that
> if an element is nillable, then the KeyRef doesn't have to refer to a
> valid key. Then it will work similar to how attributes work.

>That's a reasonable suggestion, provided you actually
>said <dog-name xsi:nil='true'/> in your instance.

>For consideration for 1.1, I think

Is there still thought that this might be incorporated into 1.1?

Thank you for any insight,
Dan Martin

Received on Monday, 1 December 2003 11:55:10 UTC