W3C home > Mailing lists > Public > public-i18n-its@w3.org > October to December 2007

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

From: Felix Sasaki <fsasaki@w3.org>
Date: Wed, 21 Nov 2007 13:56:32 +0900
Message-ID: <4743BA80.4090406@w3.org>
To: public-i18n-its@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:12:50 GMT