1

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.

3
  • 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> ...' Commented Aug 8, 2022 at 12:05
  • Did you intend to put this as an answer?
    – Nuno Linhares
    Commented Aug 11, 2022 at 18:30
  • yes, this was the answer o my issue. Commented Aug 18, 2022 at 7:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.