Internationalizing XML
Via Cafe con Leche (Elliotte Rusty Harold), the first public working draft of Best Practices for XML Internationalization has been released by the W3C Internalization Tag Set Working Group.
The document
provides best practices and techniques related to the internationalization of XML that developers of XML applications as well as content authors can use to ensure that their XML documents and schemas are easily adaptable for an international audience. These are practices and techniques that are best addressed from the start of content development if unnecessary costs and resource issues are to be avoided later on.
The item certain to cause the most discussion (and Cafe con Leche flagged this as well) is the recommendation to avoid translatable attributes. The authors illustrate this with a typical <image/> tag with src (file) and alt (alternate text) attributes. They recommend putting the alt text as the text of the image element:
<image src=”elephants.png”>Elephants bathing in the Zambezi River.</image>
I don’t see an easy way to reconcile accessibility and internationalization concerns. The alt attribute allows an author to specify alternate rendering for an image to provide a second way of getting information. Generally, the intent is to provide the alternate text only when the content consumer cannot use the primary delivery mechanism (in this case, the graphic). Placing the alternate text in an attribute captures the logical relationship between the image and the alternate text very accurately. The example shown above looks more like a caption to me. I suppose you could make your XML more complex with something like the following:
<image><alt>This text describes file.gif.</alt></image>
The alt text attribute is familiar from HTML, so the recommendation to avoid it will take some getting used to.
Michael M.-H.
I like that img/alt example. BTW, is there really a big difference between alt text and caption? Especially the XSL features in FM7.2 make it easy to change an attribute into element content (but wasn’t that possible with R/W rules as well?)
Anyway, it seems like a good thing to tell the translators “do never touch any attributes!”
Sarah
Hi Michael,
It’s easy enough to move information from an attribute to element text (and back). I suppose my concern is that people are accustomed to the “alt attribute” rather than the “alt element.”
Sarah