ACTION-42 "Come up with <inputpath> example mentioned in the 0018 mail"

Hi all,

here is a replacement proposal for example 16 in BP 13.

Felix


Example 16: Avoid dynamic names

This is an example bad design. The names of the elements serve also as 
identifiers.

<strings>
 <str1>Input path:</str1>
 <str2>Help</str2>
 <str3>OK</str3>
 <str4>Cancel</str4>
</strings>

[Example's source code]

Instead, use elements names that follow a fixed naming scheme, and use 
xml:id for the identifiers.

<strings>
 <str xml:id="str1">Input path:</str>
 <str xml:id="str2">Help</str>
 <str xml:id="str3">OK</str>
 <str xml:id="str4">Cancel</str>
</strings>

[Example's source code]

Received on Wednesday, 21 November 2007 04:56:43 UTC