Adding Note and Warning icons to doc output

mdslup
Posts: 142
Joined: Tue Mar 06, 2018 1:34 am

Adding Note and Warning icons to doc output

Post by mdslup » Wed Jun 17, 2020 9:33 pm

Using the Dita to Microsoft Word transformation, how can I add warning and caution icons the warning and caution notes?

I don't see an option for that in the Normal.docx file.

https://www.oxygenxml.com/doc/versions/ ... ml?hl=word

Radu
Posts: 7028
Joined: Fri Jul 09, 2004 5:18 pm

Re: Adding Note and Warning icons to doc output

Post by Radu » Fri Jun 19, 2020 9:20 am

Hi,

I also looked in the XSLT stylesheets in the "DITA-OT3.x/plugins/com.elovirta.ooxml/docx/word/document.topic.xsl" there is a template which outputs the note type to upper case:

Code: Select all

 <xsl:template match="*[contains(@class, ' topic/note ')]" mode="prefix">
    <w:r>
      <w:rPr>
        <w:caps/>
        <w:b w:val="true"/>
      </w:rPr>
      <w:t>
        <xsl:variable name="type" select="x:note-type(.)" as="xs:string"/>
        <xsl:call-template name="getVariable">
          <xsl:with-param name="id" select="concat(upper-case(substring($type, 1, 1)),
                                                   substring($type, 2))"/>
        </xsl:call-template>
        <xsl:text>:</xsl:text>
      </w:t>
      <!--w:tab/-->
      <w:t>
        <xsl:attribute name="xml:space">preserve</xsl:attribute>
        <xsl:text> </xsl:text>
      </w:t>
    </w:r>
  </xsl:template>
but there seems to be no support for icons. Maybe you can add an issue on the publishing plugin's issues list:

https://github.com/jelovirt/com.elovirta.ooxml/issues

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply