@ravir73578276 : If you need references to non-dita assets to work as link to assets when rendering them on AEM Site page, you need to do following:
- While authoring such links you need to ask authors to add an attribute "format" having appropriate value like "docx" to identify that this link is special (see [A])
- And before you publish the content to AEM Site, you need to add a rule in "elementmapping.xml" to indicate the publishing process to handle this differently, see [B]. With this configuration the links to docx type files will point to their original loction in AEM Assets. (note that when you update elementmapping.xml you need to follow additional notes given in Installation and Configuration guide page 106)
- Then you can try publishing the map to AEM Site - it should work as you expect then
[A]: authored xref with format attribute
<xref href="GUID-8e29cf2b-fa8c-4c5e-8f8f-a6c54491d33f.docx" format="docx" scope="local"> </xref>
[B]: snippet for elementmapping.xml to enable links to non-dita assets to work on AEM Sites
<ditaelement>
<name>xref</name>
<class>- topic/xref</class>
<componentpath>fmdita/components/dita/link</componentpath>
<type>COMPOSITE</type>
<target>para</target>
<textprop>text</textprop>
<xpath><![CDATA[//xref[@format='docx']]]></xpath>
<attributemap>
<attribute from="href" to="link" ispath="true" rel="SOURCE" />
<attribute from="format" to="format" />
<attribute from="scope" to="scope" />
</attributemap>
</ditaelement>