]> granicus.if.org Git - docbook-dsssl/commitdiff
More tweaking the way that XSLTHL does or does not get called
authorKeith Fahlgren <abdelazer@users.sourceforge.net>
Fri, 20 Feb 2009 05:00:14 +0000 (05:00 +0000)
committerKeith Fahlgren <abdelazer@users.sourceforge.net>
Fri, 20 Feb 2009 05:00:14 +0000 (05:00 +0000)
xsl/fo/verbatim.xsl
xsl/html/verbatim.xsl

index 216c5f9f6b871a2de6bdb3470df093efb2f4a77b..8e4b243ef78071c340166e91adf12f535060395d 100644 (file)
 <!-- These stylesheets should be included (in your customization layer
      or elsewhere) only if you want to use the XSLTHL highlighting tool 
 <xsl:include href="../highlighting/common.xsl"/>
-<xsl:include href="highlight.xsl"/>-->
+<xsl:include href="highlight.xsl"/>
+     ... and the next apply-highlighting template should be deleted-->
+<xsl:template name="apply-highlighting">
+    <xsl:apply-templates/>
+</xsl:template>
 
 <lxslt:component prefix="xverb"
                  functions="numberLines"/>
                       and $linenumbering.extension != '0'">
         <xsl:call-template name="number.rtf.lines">
           <xsl:with-param name="rtf">
-           <xsl:call-template name="apply-highlighting"/>
+            <xsl:choose>
+              <xsl:when test="$highlight.source != 0">
+                <xsl:call-template name="apply-highlighting"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:apply-templates/>
+              </xsl:otherwise>
+            </xsl:choose>
           </xsl:with-param>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
-       <xsl:call-template name="apply-highlighting"/>
+        <xsl:choose>
+          <xsl:when test="$highlight.source != 0">
+            <xsl:call-template name="apply-highlighting"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
index 1c7a306a8863de271a57a6c2b623d7e40a035719..285db524b534a431976575e5ed45321c33111680 100644 (file)
                    and $use.extensions != '0'
                    and $linenumbering.extension != '0'">
       <xsl:variable name="rtf">
-       <xsl:call-template name="apply-highlighting"/>
+        <xsl:choose>
+          <xsl:when test="$highlight.source != 0">
+            <xsl:call-template name="apply-highlighting"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:variable>
       <pre>
         <xsl:apply-templates select="." mode="class.attribute"/>
     <xsl:otherwise>
       <pre>
         <xsl:apply-templates select="." mode="class.attribute"/>
-       <xsl:call-template name="apply-highlighting"/>
+        <xsl:choose>
+          <xsl:when test="$highlight.source != 0">
+            <xsl:call-template name="apply-highlighting"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
       </pre>
     </xsl:otherwise>
   </xsl:choose>