Su-Laine Yeo
Solutions Consultant
Member
Posts: 260
|
 |
« on: January 06, 2009, 07:00:32 PM » |
|
When displaying a document that contains an image, a limitation of XMetaL is that it cannot simultaneously show both the actual image and a sub-element of the <image> element, such as an <alt> element. You also cannot insert an <alt> element for an image if the image is displayed.
To work with <alt> elements within images, click View > Hide Inline Images. This will hide images, but allow you to view, edit, and insert <alt> elements in both Normal and Tags On views.
DITA users can also use the Insert Image or Figure or Image or Figure Properties dialogs to view, edit, and insert <alt> elements. See the additional notes below.
Additional notes on the <alt> element in DITA
The DITA 1.1 language reference says, "The alt element provides alternate text for an image. It is equivalent to the alt attribute on the image element; the attribute is deprecated, so the alt element should be used instead. As an element, alt provides direct text entry within an XML editor and is more easily accessed than an attribute for translation."
Because "alt text" can be stored in either an attribute or an element, XMetaL's dialogs for editing image properties use some special logic to support either choice: - If the alt attribute does not have a value, anything typed into the Alt Text field goes into the alt element when the user clicks OK (the system creates an alt element if needed). - If the alt attribute has a value, and there is no alt element, the Alt Text field displays the contents of the alt attribute, and anything in this field is saved to the alt attribute, not the element, when the user clicks OK. - If the alt attribute has a value, and there is also an alt element, the Alt Text field displays the contents of the alt element, and anything in this field is saved to the alt element when the user clicks OK.
The dialogs are designed to encourage use of the <alt> element, while ensuring that people using the alt attribute wouldn’t have their data seem to disappear. Note that XMetaL does not move content from alt attributes to <alt> elements, or vice-versa.
|