<xsl:template match="d:programlistingco|d:screenco">
<xsl:variable name="verbatim" select="d:programlisting|d:screen"/>
<xsl:choose>
<xsl:when test="$use.extensions != '0' and $callouts.extension != '0'">
<xsl:variable name="rtf">
<xsl:apply-templates select="$verbatim">
<xsl:with-param name="suppress-numbers" select="'1'"/>
</xsl:apply-templates>
</xsl:variable>
<xsl:variable name="rtf-with-callouts">
<xsl:choose>
<xsl:when test="function-available('sverb:insertCallouts')">
<xsl:copy-of select="sverb:insertCallouts(d:areaspec,$rtf)"/>
</xsl:when>
<xsl:when test="function-available('xverb:insertCallouts')">
<xsl:copy-of select="xverb:insertCallouts(d:areaspec,$rtf)"/>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>No insertCallouts function is available.</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$verbatim/@linenumbering = 'numbered' and $linenumbering.extension != '0'">
<div>
<xsl:call-template name="common.html.attributes"/>
<xsl:call-template name="number.rtf.lines">
<xsl:with-param name="rtf" select="$rtf-with-callouts"/>
<xsl:with-param name="pi.context" select="d:programlisting|d:screen"/>
</xsl:call-template>
<xsl:apply-templates select="d:calloutlist"/>
</div>
</xsl:when>
<xsl:otherwise>
<div>
<xsl:call-template name="common.html.attributes"/>
<xsl:copy-of select="$rtf-with-callouts"/>
<xsl:apply-templates select="d:calloutlist"/>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<div>
<xsl:apply-templates select="." mode="common.html.attributes"/>
<xsl:apply-templates/>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template> |