W3C home > Mailing lists > Public > public-i18n-its@w3.org > April to June 2005

[ESW Wiki] Update of "its0503ReqEntities" by YvesSavourel

From: <w3t-archive+esw-wiki@w3.org>
Date: Mon, 18 Apr 2005 13:02:12 -0000
To: w3t-archive+esw-wiki@w3.org
Message-ID: <20050418130212.30196.90695@swada.w3.org>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "ESW Wiki" for change notification.

The following page has been changed by YvesSavourel:
http://esw.w3.org/topic/its0503ReqEntities


------------------------------------------------------------------------------
  
   3. If entities are used, the XML instances should have standalone="no" in their XML declarations (see http://www.w3.org/TR/REC-xml/#sec-rmd).
  
- == Permissable use of user defined entities ==
- 
- Following on from the previous node one can also make the following recommendations:
- 
- 1. User defined entities should never be used within #PCDATA - the text content of an element. The reasons for this have been outlined above.
- 
- 2. User defined enitities CAN be useful for the creation of boilerplate text. In this, and only this instance they can be very beneficial.
- 
- The boilerplate text is held by Locale, so that depending on the target language the appropriate text is selected. Boiler plate text by its very nature is used for headings etc. and is linguistically complete - it stands alone and does not rely on any surrounding context. The boiler plate entities are only ever used within attributes. The composition process uses the attribute values to display the appropriate target language text: 
- 
- e.g.
- 
- In the following example the DTD is fragmented so that multiple language versions can all share the key core components. Only the bp_pl-pl_xml.ent defines the language specific boilerplate text:
- 
- '''sample-pl.dtd:'''
- ------------------------------------------------------------------
- <!ENTITY % conf PUBLIC "-//XML-INTL//ENTITIES pub Conf//EN"  "'''sample.elm'''" >
- 
- <!ENTITY % bp PUBLIC "-//XML-INTL//ENTITIES boilerplate XML-INTL//PL-PL" "'''bp_pl-pl_xml.ent'''">
- 
- <!ENTITY % cals PUBLIC "-//XML-INTL//ELEMENTS CALS Table XML//EN" "'''cals-xml.elm'''">
- 
- %conf;
- 
- %bp;
- 
- %cals;
- 
- ------------------------------------------------------------------
- 
- '''bp_pl-pl_xml.ent:'''
- 
- ------------------------------------------------------------------
- 
- <!ENTITY '''locale''' 'pl-PL'>
- 
- <!ENTITY '''copyright-owner''' 'XML-INTL Limited, PO Box 2167, Gerrards Cross, Bucks SL9 8XF, United Kingdom'>
- 
- <!ENTITY '''copyright-text''' 'Niniejszy tekst jest własnością intelektualną XML-INTL, wszelkie prawa kopiowania tego tekstu są zastrzerzone'>
- 
- ------------------------------------------------------------------
- 
- '''sample.elm:'''
- 
- ------------------------------------------------------------------
- 
- <!ELEMENT heading (para+) >
- <!ATTLIST heading
- 
-         locale         CDATA #FIXED "'''&locale;'''"
- 
-         copyright-owner CDATA #FIXED "'''&copyright-owner;'''"
- 
-         copyright-text     CDATA #FIXED "'''&copyright-text;'''" >
- 
- ------------------------------------------------------------------
- 
- The key rule regarding the use of user defined entities with regards to i18n is ''NEVER'' allow entities within ''ANY PCDATA'' context where they can cause immense problems. You ''CAN'' use entities for linguistically complete and stand alone text that is used for boilerplate text.
- 
Received on Monday, 18 April 2005 13:02:13 GMT

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