(Imported from Google Code)
Currently, components use getOutput(isHTML, prefix) to format HTML or Text output. Having an optional 1-based index as a parameter would position the library well to respond to open DDMS CRs for lists and multiples.
For example:
publisher[1].name[1]: Brian
publisher[1].name[2]: BU
An index can appear any time more than one item is supported in the DDMS specification. However, if there is only 1 in the instance, the index could be optional.
Rev 726 adds the index generation code and configurable property.
Rev 727 adds a suffix to all of the output methods. This can be the hook to insert the index.
Complete in Rev 728. By default, the output.indexLevel property is set to 0. This means that the HTML/Text output looks exactly the same as it always did.
At level 1, indices are shown unless there is only 1 item to show.
At level 2, indices are shown whenever multiples are possible, even if there's only 1 to show.
A CR has been submitted to the DDMS team to formalize this system of handling multiples.