Adding new diagnostic messages
Use the dita.xsl.messages
extension point to add plug-in-specific messages to the
diagnostic messages that are generated by DITA-OT. These messages then can be used by any XSLT override.
Procedure
What to do next
Add the following call in XSLT modules to generate a message when a specific condition occurs:
<xsl:call-template name="output-message">
<xsl:with-param name="id">prefixnumberletter</xsl:with-param>
<xsl:with-param name="msg">Message text and parameters.</xsl:with-param>
</xsl:call-template>
You can also pass custom parameters to the template by using the @msgparams
parameter. The
value of @msgparams
is a semicolon separated list of strings, where each token consists of a
percent sign prefixed parameter index, equals sign and parameter value.
<xsl:call-template name="output-message">
<xsl:with-param name="id">prefixnumberletter</xsl:with-param>
<xsl:with-param name="msgparams">%1=MyFirstValue;%2=MySecondValue</xsl:with-param>
</xsl:call-template>
Use the ctx
parameter if calling from a function.