Redlining Support Extensions

Redlining support extensions provide stylesheet authors with the ability to know whether the content was redlined (marked), and allows to fetch the annotation text. This functionality is provided with xse:redline('request-type', context-node?) extension function. Request types may be as follows:

The second parameter may be used to redefine the function context node, which is equal to the current XSLT context by default. The following example will render the redline annotation in-place when annotation element is encountered:

<xsl:template match="annotation">

  <xsl:value-of select="xse:redline('annotation')"/>

</xsl:template>

Serna also allows to redefine the decorations of redlined content, which are generated by built-in template which produces se:section extension FO. By default these decorations are shown as square brackets. Users can define named templates serna.redline.start.template and serna.redline.end.template so they will be called instead of built-in templates.

Default built-in redline decoration templates are defined as follows:

<xsl:template name="serna.redline.start.template">

  <se:section type="redline" kind="start"/>

</xsl:template>



<xsl:template name="serna.redline.end.template">

  <se:section type="redline" kind="end"/>

</xsl:template>