| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!-- Deprecated since 2.2 -->
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:opentopic-func="http://www.idiominc.com/opentopic/exsl/function"
- exclude-result-prefixes="xsl opentopic-func"
- xmlns:suitesol="http://suite-sol.com/namespaces/mapcounts"
- version="2.0">
- <xsl:import href="flag-rules.xsl"/>
- <xsl:import href="plugin:org.dita.base:xsl/common/dita-utilities.xsl"/>
- <xsl:import href="plugin:org.dita.base:xsl/common/output-message.xsl"/>
-
- <dita:extension id="dita.xsl.xslfo.flagging-preprocess"
- behavior="org.dita.dost.platform.ImportXSLAction"
- xmlns:dita="http://dita-ot.sourceforge.net"
- />
- <!--preserve the doctype-->
- <xsl:output method="xml" encoding="UTF-8" indent="no"></xsl:output>
- <xsl:param name="filterFile" select="''"/>
- <!-- The document tree of filterfile returned by document($FILTERFILE,/)-->
- <!-- Define the error message prefix identifier -->
- <!-- Deprecated since 2.3 -->
- <xsl:variable name="msgprefix">DOTX</xsl:variable>
- <xsl:variable name="FILTERFILEURL">
- <xsl:choose>
- <xsl:when test="not($filterFile)"/>
- <!-- If no filterFile leave empty -->
- <xsl:when test="starts-with($filterFile,'file:')">
- <xsl:value-of select="$filterFile"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="starts-with($filterFile,'/')">
- <xsl:text>file://</xsl:text>
- <xsl:value-of select="$filterFile"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>file:/</xsl:text>
- <xsl:value-of select="$filterFile"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="flagsParams" select="document($FILTERFILEURL,/)"/>
-
- <xsl:template match="*" mode="flagging">
- <xsl:param name="pi-name"/>
- <xsl:param name="id"/>
- <xsl:param name="flagrules" />
- <xsl:if test="$flagrules">
- <xsl:variable name="conflictexist">
- <xsl:apply-templates select="." mode="conflict-check">
- <xsl:with-param name="flagrules" select="$flagrules"/>
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:variable name="style">
- <xsl:call-template name="gen-style">
- <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:if test="string-length($style) > 0">
- <xsl:element name="suitesol:{$pi-name}">
- <xsl:attribute name="id">
- <xsl:value-of select="$id"/>
- </xsl:attribute>
- <xsl:attribute name="style">
- <xsl:value-of select="$style"/>
- </xsl:attribute>
- </xsl:element>
- </xsl:if>
- </xsl:if>
-
- </xsl:template>
- <xsl:template match="*" mode="changebar">
- <xsl:param name="pi-name"/>
- <xsl:param name="id"/>
- <xsl:param name="flagrules" />
- <xsl:if test="$flagrules">
- <xsl:for-each select="$flagrules/*[@changebar]">
-
- <xsl:element name="{concat('suitesol:changebar-',$pi-name)}">
- <xsl:attribute name="id">
- <xsl:value-of select="concat($id,'_',count(preceding::*))"/>
- </xsl:attribute>
- <xsl:if test="$pi-name='start'">
- <xsl:attribute name="changebar">
- <xsl:value-of select="@changebar"/>
- </xsl:attribute>
- </xsl:if>
- </xsl:element>
- </xsl:for-each>
- </xsl:if>
- </xsl:template>
- <xsl:template match="*" mode="copy-contents">
- <xsl:param name="id"/>
- <xsl:param name="flagrules" />
- <xsl:call-template name="start-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- <xsl:call-template name="end-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
- <!-- Don't flag topics, just like in the HTML output -->
- <xsl:template match="*[contains(@class, ' topic/topic ')]"
- priority="50">
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
-
- <!-- For these elements, the flagging style can be applied directly to the fo element
- already being created by the default DITA-OT processing -->
- <xsl:template match="*[contains(@class, ' topic/image ') or contains(@class,' topic/table ') or
- contains(@class, ' topic/ol ') or
- contains(@class, ' topic/ul ') or contains(@class, ' topic/sl ')]"
- priority="50">
- <xsl:variable name="id">
- <xsl:value-of select="generate-id(.)"/>
- </xsl:variable>
- <xsl:variable name="flagrules">
- <xsl:apply-templates select="." mode="getrules">
- </xsl:apply-templates>
- </xsl:variable>
-
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">start</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- <xsl:call-template name="start-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
-
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates select="." mode="flagging">
- <xsl:with-param name="pi-name">flagging-inside</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- <xsl:apply-templates/>
- </xsl:copy>
-
- <xsl:call-template name="end-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">end</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- </xsl:template>
- <!-- For these elements, the flagging style must be applied to a new fo:block around the element,
- which for now is place-held by the suitesol:flagging-outside element -->
- <xsl:template match="*[contains(@class, ' topic/simpletable ') or contains(@class, ' topic/dl ') or contains(@class, ' topic/note ') or contains(@class, ' pr-d/codeblock ') or contains(@class, ' ui-d/screen ')]"
- priority="40">
- <xsl:variable name="id">
- <xsl:value-of select="generate-id(.)"/>
- </xsl:variable>
- <xsl:variable name="flagrules">
- <xsl:apply-templates select="." mode="getrules">
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">start</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- <xsl:variable name="style">
- <xsl:if test="$flagrules">
- <xsl:variable name="conflictexist">
- <xsl:apply-templates select="." mode="conflict-check">
- <xsl:with-param name="flagrules" select="$flagrules"/>
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:call-template name="gen-style">
- <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string-length(normalize-space($style)) > 0">
- <suitesol:flagging-outside style="{$style}">
- <xsl:apply-templates select="." mode="copy-contents">
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- </suitesol:flagging-outside>
- </xsl:when>
- <!-- If there's no style, don't bother creating the surrounding block -->
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="copy-contents">
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">end</xsl:with-param>
- <xsl:with-param name="id">
- <xsl:value-of select="$id"/>
- </xsl:with-param>
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <!-- For these elements, the flagging style must be applied to a new fo:inline around the element,
- which for now is place-held by the suitesol:flagging-outside-inline element -->
- <xsl:template match="*[contains(@class, ' topic/xref ') or contains(@class, ' topic/link ')]"
- priority="40">
- <xsl:variable name="id">
- <xsl:value-of select="generate-id(.)"/>
- </xsl:variable>
- <xsl:variable name="flagrules">
- <xsl:apply-templates select="." mode="getrules">
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">start</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- <xsl:variable name="style">
- <xsl:if test="$flagrules">
- <xsl:variable name="conflictexist">
- <xsl:apply-templates select="." mode="conflict-check">
- <xsl:with-param name="flagrules" select="$flagrules"/>
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:call-template name="gen-style">
- <xsl:with-param name="conflictexist" select="$conflictexist"></xsl:with-param>
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string-length(normalize-space($style)) > 0">
- <suitesol:flagging-outside-inline style="{$style}">
- <xsl:apply-templates select="." mode="copy-contents">
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- </suitesol:flagging-outside-inline>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="copy-contents">
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">end</xsl:with-param>
- <xsl:with-param name="id">
- <xsl:value-of select="$id"/>
- </xsl:with-param>
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <!-- For these elements, the flagging style can be applied directly to the fo element
- already being created by the default DITA-OT processing, but now the startflag and endflag images
- are placed inside the element rather than before and after it -->
- <xsl:template match="*[contains(@class,' topic/entry ') or contains(@class, ' topic/stentry ') or
- contains(@class, ' topic/dd ') or contains(@class, ' topic/dt ') or
- contains(@class, ' topic/ddhd ') or contains(@class, ' topic/dthd ')]"
- priority="30">
- <xsl:variable name="id">
- <xsl:value-of select="generate-id(.)"/>
- </xsl:variable>
-
- <xsl:variable name="flagrules">
- <xsl:apply-templates select=". | parent::*" mode="getrules">
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">start</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <!-- copy attributes from parents -->
- <xsl:apply-templates select="." mode="flagging">
- <xsl:with-param name="pi-name">flagging-inside</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- <xsl:call-template name="start-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- <xsl:apply-templates/>
- <xsl:call-template name="end-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
-
- </xsl:copy>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">end</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- </xsl:template>
- <!-- For these elements, the flagging style can be applied directly to the fo element
- already being created by the default DITA-OT processing,
- but startflag and endflag images are not supported (where would they go?) -->
- <xsl:template match="*[contains(@class,' topic/tgroup ') or contains(@class, ' topic/thead ') or
- contains(@class,' topic/tfoot ') or contains(@class,' topic/tbody ') or contains(@class,' topic/row ') or contains(@class, ' topic/strow ') or
- contains(@class, ' topic/dlentry ') or contains(@class, ' topic/dlhead ') or
- contains(@class, ' topic/sthead ')]"
- priority="20">
- <xsl:variable name="id">
- <xsl:value-of select="generate-id(.)"/>
- </xsl:variable>
- <xsl:variable name="flagrules">
- <xsl:apply-templates select="." mode="getrules">
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">start</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates select="." mode="flagging">
- <xsl:with-param name="pi-name">flagging-inside</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- <xsl:apply-templates/>
- </xsl:copy>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">end</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- </xsl:template>
-
- <!-- For all other elements, we try to apply the flagging style directly to the fo element
- already being created by the default DITA-OT processing, and place the startflag and endflag images
- inside the element -->
- <xsl:template match="*" priority="-1">
- <xsl:variable name="id">
- <xsl:value-of select="generate-id(.)"/>
- </xsl:variable>
- <xsl:variable name="flagrules">
- <xsl:apply-templates select="." mode="getrules">
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">start</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates select="." mode="flagging">
- <xsl:with-param name="pi-name">flagging-inside</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
- <xsl:call-template name="start-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
- <xsl:apply-templates/>
- <xsl:call-template name="end-flagit">
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:call-template>
-
- </xsl:copy>
-
- <xsl:apply-templates select="." mode="changebar">
- <xsl:with-param name="pi-name">end</xsl:with-param>
- <xsl:with-param name="id" select="$id" />
- <xsl:with-param name="flagrules" select="$flagrules"></xsl:with-param>
- </xsl:apply-templates>
-
- </xsl:template>
- <xsl:template match="@*" priority="-1">
- <xsl:copy-of select="."/>
- </xsl:template>
- <!-- copy over all comments so that <a> won't be empty -->
- <xsl:template match="comment() | processing-instruction() | text()">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template name="gen-style">
- <xsl:param name="conflictexist" select="'false'"/>
- <xsl:param name="flagrules"/>
- <xsl:variable name="colorprop">
- <xsl:choose>
- <xsl:when test="contains(@class, ' topic/image ')">
- <xsl:text>border-style:solid;border-width:1pt;border-color:</xsl:text>
- </xsl:when>
- <xsl:otherwise>color:</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="back-colorprop">
- <xsl:choose>
- <xsl:when test="contains(@class, ' topic/image ')">
- <xsl:text>border-style:solid;border-width:3pt;border-color:</xsl:text>
- </xsl:when>
- <xsl:otherwise>background-color:</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="$conflictexist='true' and $flagsParams/val/style-conflict[@foreground-conflict-color or @background-conflict-color]">
- <xsl:call-template name="output-message">
- <xsl:with-param name="id" select="'DOTX054W'"/>
- </xsl:call-template>
- <xsl:if test="$flagsParams/val/style-conflict[@foreground-conflict-color]">
- <xsl:value-of select="$colorprop"/>
- <xsl:value-of select="$flagsParams/val/style-conflict/@foreground-conflict-color"/>
- <xsl:text>;</xsl:text>
- </xsl:if>
- <xsl:if test="$flagsParams/val/style-conflict[@background-conflict-color]">
- <xsl:value-of select="$back-colorprop"/>
- <xsl:value-of select="$flagsParams/val/style-conflict/@background-conflict-color"/>
- <xsl:text>;</xsl:text>
- </xsl:if>
- </xsl:when>
- <xsl:when test="$conflictexist='false' and $flagrules/*[@color or @backcolor]">
- <xsl:if test="$flagrules/*[@color]">
- <xsl:value-of select="$colorprop"/>
- <xsl:value-of select="$flagrules/*[@color]/@color"/>
- <xsl:text>;</xsl:text>
- </xsl:if>
- <xsl:if test="$flagrules/*[@backcolor]">
- <xsl:value-of select="$back-colorprop"/>
- <xsl:value-of select="$flagrules/*[@backcolor]/@backcolor"/>
- <xsl:text>;</xsl:text>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
-
- <xsl:for-each select="$flagrules/*[@style]">
- <xsl:choose>
- <xsl:when test="./@style='bold'">
- <xsl:text>font-weight:</xsl:text>
- </xsl:when>
- <xsl:when test="./@style='italics' or ./@style='italic'">
- <xsl:text>font-style:</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>text-decoration:</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="./@style='double-underline'">
- <xsl:text>underline</xsl:text>
- </xsl:when>
- <xsl:when test="./@style='italics'">
- <xsl:text>italic</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./@style"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>;</xsl:text>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="start-flagit">
- <xsl:param name="flagrules" />
- <xsl:apply-templates select="$flagrules/*[1]" mode="start-flagit"/>
- </xsl:template>
- <xsl:template match="prop|revprop" mode="start-flagit">
- <xsl:choose>
- <!-- Ensure there's an image to get, otherwise don't insert anything -->
- <xsl:when test="startflag/@imageref">
- <xsl:variable name="imgsrc" select="startflag/@imageref"/>
- <image class="- topic/image " placement="inline">
- <xsl:attribute name="href">
- <xsl:value-of select="$imgsrc"/>
- </xsl:attribute>
- <xsl:if test="startflag/alt-text">
- <xsl:attribute name="alt">
- <xsl:value-of select="startflag/alt-text"/>
- </xsl:attribute>
- </xsl:if>
- </image>
- </xsl:when>
- <xsl:when test="startflag/alt-text">
- <xsl:value-of select="startflag/alt-text"/>
- </xsl:when>
- <xsl:when test="@img">
- <!-- output the flag -->
- <image class="- topic/image " placement="inline">
- <xsl:attribute name="href">
- <xsl:value-of select="@img"/>
- </xsl:attribute>
- </image>
- </xsl:when>
- <xsl:otherwise/>
- <!-- that flag not active -->
- </xsl:choose>
- <xsl:apply-templates select="following-sibling::*[1]" mode="start-flagit"/>
- </xsl:template>
- <xsl:template name="end-flagit">
- <xsl:param name="flagrules">
- <!--xsl:call-template name="getrules"/-->
- </xsl:param>
- <xsl:apply-templates select="$flagrules/*[last()]" mode="end-flagit"/>
- </xsl:template>
- <xsl:template match="prop|revprop" mode="end-flagit">
- <xsl:choose>
- <!-- Ensure there's an image to get, otherwise don't insert anything -->
- <xsl:when test="endflag/@imageref">
- <xsl:variable name="imgsrc" select="endflag/@imageref"/>
- <image class="- topic/image " placement="inline">
- <xsl:attribute name="href">
- <xsl:value-of select="$imgsrc"/>
- </xsl:attribute>
- <xsl:if test="endflag/alt-text">
- <xsl:attribute name="alt">
- <xsl:value-of select="endflag/alt-text"/>
- </xsl:attribute>
- </xsl:if>
- </image>
- </xsl:when>
- <xsl:when test="endflag/alt-text">
- <xsl:value-of select="endflag/alt-text"/>
- </xsl:when>
- <!-- not necessary to add logic for @img. original ditaval does not support end flag. -->
- <xsl:otherwise/>
- <!-- that flag not active -->
- </xsl:choose>
- <xsl:apply-templates select="preceding-sibling::*[1]" mode="end-flagit"/>
- </xsl:template>
- </xsl:stylesheet>
|