dmio:attribute

Creates an I/O attribute element. An I/O attribute intended for writing must declare the source of its values. If getting values from an iterator, it must use the iterator or collection attribute. If listening to an iterator, it must use the id attribute so the iterator can locate it.

Element Information

Element class AttributeConfig
Implementation class DMAttribute
Nested elements iterators and collections: ints, doubles, dates, strings, constants, value list

Attributes

Name Type Required Description
nameStringno The attribute's name.
datatypestringno Can be used to coerce the attribute's datatype.
collectionStringno The id of a collection, from which the attribute will create an iterator.
iteratorstringno The id of an iterator, from which the attribute will get values.
repeatbooleanno The repeat attribute can be used with the collection attribute, to set the repeat flag for the iterator that is created.
currentbooleanno If true, the attribute uses the iterator's current value.
formatstringno A format pattern applied to each value that is read or written.
valuestringno The dot-separated name by which to locate a value in an ancestor element.

Examples

    
    <!-- an element with several attributes -->
    <dmio:element>
      <dmio:attribute name="name" value="class.name"/>
      <dmio:attribute name="book" iterator="foo" repeat="true"/>
      <dmio:attribute name="count">
        <dm:ints range="[0,10]" repeat="true"/>
      </dmio:attribute>
    </dmio:element>