Andy Bierman <[email protected]> writes:
> Using a key of type empty is utterly pointless unless the point
> is to make the instance identifier longer.
IMO using a key of type empty (or any type with only one value) is
*pointless* but should be *valid*. Things should be valid unless
processing them according to the ordinary rules can't work. Indeed,
specifically banning them increases the complexity of the
specification.
The reason for this is that the code (in this case, the module
definition) may be generated by an automatic process, and those
processes are easier to construct if the rules contain fewer
irregularities. E.g., multiplying a number by zero is pointless, in
that the result is always zero, and one might ask, Why not just write 0
instead of the multiplication? But everyone agrees that the statement
a = 0 * b;
is *valid*, and can easily imagine situations where a process might
generate it as an output.
>> Unless I'm off, the line should be fixed to avoid the string
>> conversion:
>>
>> /ex:system/ex:service[ex:name='foo'][ex:enabled]
>>
>> and a negation should be:
>>
>> /ex:system/ex:service[ex:name='foo'][not(ex:enabled)]
>
> There is only one value provided by type empty. The 2nd instance
> identifier is invalid.
> There is no instance possible that does not include the 'enabled' leaf.
The 2nd instance identifier is (should be) *valid* even if it always
returns the empty set. (Assuming it is used in contexts where a set can
be returned.)
Dale
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod