OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Issue with value nodes and null values


In working on the minutes from last Friday's TC telecon, I realized there is a potential issue around value nodes (the node represented by the final & in an XDI subject). We have said that:
  1. The value of an attribute instance or singleton is null if it has no value node.
  2. If an attribute instance or singleton has a value node, the value is not null.
Here is the issue: if we allow a value node to have a $ref (or $rep) to another value node in another context, then how does that target context represent that the value is null?

Example:

    =example+work<+tel>&/$ref/(https://ldap.example.com)!1234<+tel>&

The problem is that the target context can only express that the attribute instance/singleton is null by not having a value node. But that's ugly because it begs ambiguity: there is no easy way to distinguish between the $ref to the target value node simply being incorrect (and therefore not existing) and the $ref being valid but the value being null.

One solution would be to disallow relations on value nodes, and only allow them to contain values. In this case, the $ref or $rep relation would need to go on the attribute instance/singleton context node.

But that drawback to this solution is lack of precision: it means you can't just make a $ref to a single value in some external data source but have to force that data source to contain to the entire XDI attribute context tree (which may include timestamps, versions, and other metadata) -- which many external data sources may not be capable of.

Another solution is to change our original rules and specify that there are two mutually exclusive but equivalent ways to indicate that the value of an attribute instance/singleton is null:
  1. The absence of a value node on the attribute instance/singleton.
  2. The presence of a value node on the attribute instance/singleton with a JSON value of null
This third solution would solve the problem cleanly: when a value node needs to $ref or $rep another value node, the target value node can unambiguously represent that the value is null, but attribute instance/singleton contexts whose value is null can still use the shorthand of not having a value node to indicate this.

Any objections?



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]