Allow HTML/Text output formatters to have an index suffix

Description

(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.

Activity

Show:
Brian Uri
October 9, 2011, 7:26 AM

Rev 726 adds the index generation code and configurable property.

Brian Uri
October 9, 2011, 7:40 AM

Rev 727 adds a suffix to all of the output methods. This can be the hook to insert the index.

Brian Uri
October 9, 2011, 9:12 AM

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.

Fixed

Assignee

Brian Uri

Reporter

Brian Uri

Labels

None

Fix versions

Priority

Medium