In our Tridion Docs implementation, we often have topics that have images. Now most editors while inserting images also add the <alt> element, and include elements like <i> within it as shown below: enter image description here

This is causing issues in publishing such content from the Tridion Docs CMS. We have looked for patterns that can be added to the OXYGEN_INSTALL_DIR/frameworks/dita/resources/dita-1.2-for-xslt2-mandatory.sch file, but there is nothing for the image alt element.

Any suggestions would be highly appreciated as this is quite a recurring problem, and would be nice to have a rule set to prevent content editors from using these elements withing the element.

  • The below pattern works for all types of elements within the <alt>: '... <rule context="alt/*"> <report test="true()" role="error" sqf:fix="removeMarkup"> alt should not contain additional elements, only text. </report> <sqf:fix id="removeMarkup"> <sqf:description> <sqf:title>alt should not contain additional elements. Remove markup keeping the text content.</sqf:title> </sqf:description> <sqf:replace match="." select="node()"/> </sqf:fix> </rule> ...' Aug 8 at 12:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.