← Prev in month
← Prev in thread
Make "*-on-and-only" an AttributeDescription option
I would like to propose that we add an optional "OneAndOnly" XML
attribute to the <AttributeDescriptor> element. If this
attribute is "true", it causes the <AttributeDescriptor> to
evaluate to a single element of its DataType, rather than a bag
of such elements. If this XML attribute is used, and the
<AttributeDescriptor> matches no element or more than one
element, then the evaluation result will be "Indeterminate". The
default value of the OneAndOnly Attribute is "false".
The intent is that
<SomeAttributeDescriptor AttributeId="x" DataType="y" OneAndOnly="true"/>
be exactly equivalent to
<Apply FunctionId="y-one-and-only">
<SomeAttributeDescriptor AttributeId="x" DataType="y""/>
</Apply>
Rationale:
All our standard functions except for the specific bag
functions expect a single value, so the case for expecting and
wanting a single attribute is extremely common. It is awkward,
verbose, and probably confusing to wrap all instances of
<AttributeDescriptor> with an <Apply> of a "*-one-and-only"
function.
Anne
--
Anne H. Anderson Email:
Sun Microsystems Laboratories
1 Network Drive,UBUR02-311 Tel: 781/442-0928
Burlington, MA 01803-0902 USA Fax: 781/442-1692
← Prev in month
← Prev in thread