draft of requirement related to entities

Hello,

Yves and myself took the action item to come up with a first draft of
requirements related to entities. Please find our initial
thoughts below.

The initial impetus for creating this requirement is
http://lists.w3.org/Archives/Public/public-i18n-its/2005JanMar/0030.html

Best regards,
Christian and Yves
---

Requirement:

User-defined entities must be used only with care. XML applications
which make use of entities have to build in such a way that
entities can be localized easily (ie. the XML application has to be
internationalized wrt. entities).

Background:

XML applications (ie. a combination of DTD/XSD, stylesheets, XML
instances) often are subdivided into physical units called entities (see
http://www.xml.com/axml/target.html#sec-physical-struct).
Various types of entities exist (see
http://tech.irt.org/articles/js212/#intro).
Examples:

1- A character entity. The entity defines a single Unicode character.

Example: <!ENTITY aacute "&#225;" >

2- A short element-free text. The entity defines a short text that
contains only text (no element or other XML constructs). This is
for instance an entity for a product name.

Example: <!ENTITY ProductName "PictoMagic for Windows" >

3- A longer text with one or more elements. The entity defines a piece
of boiler-plate text such as a copyright paragraph.

Example: <!ENTITY CopyrightInfo "<a href='\copyright.htm'>Copyright</a>
2005 W3C.">

Two aspects of entities are of particular importance wrt.
internationalization and localization:

1.	entities are defined
2.	entities are used

The snippet

	<!ENTITY ProductName "PictoMagic for Windows" >

for example defines an entity called 'ProductName', and the snippet

	The latest version of &ProductName; features many enhancements.

references/uses the entity.

If internationalization and localization are not addressed for
entity-related work several issues may arise:

1.	Entity reference cannot be resolved
Example: the definition is not available to the XML processor

2.	Entity definition does not fit with the surrounding context
language-wise
Example: The context in 'Das Produkt &ProductName; ist mit vielen
Erweiterungen ausgestattet worden' is German whereas the
definition may be in English

3.	Entity definition does not fit with the surrounding context
grammar-wise
Example: The syntax in 'The latest version of &ProductName; features
many enhancements' may be incorrect if the definition
designates an object in plural.

Notes:

Ideally, the solution which the WG will produce will be applicable not
only wrt. entities but also in the realm of XInclude (see
http://www.w3.org/TR/xinclude/) or even fragments (see 
http://www.w3.org/TR/2001/CR-xml-fragment-20010212#packaging).

Received on Thursday, 24 March 2005 14:48:39 UTC