"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.11.23/docutil/patch-db2latex-duplicate-template-bug" (7 Sep 2020, 2980 Bytes) of package /linux/misc/dns/bind9/9.11.23/bind-9.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ;; This is a patch to work around a known bug in db2latex.  Apparently
    2 ;; xsltproc's error checking got a lot better since the authors of
    3 ;; db2latex last tested this, so a clear language violation that
    4 ;; xsltproc used to ignore now prevents xsltproc from working with
    5 ;; db2latex.
    6 ;; 
    7 ;; On FreeBSD you can simply drop this patch into the directory
    8 ;; /usr/ports/textproc/db2latex/files/ and the ports system should
    9 ;; take it from there.  I've sent this patch off to the port
   10 ;; maintainer but have not yet heard anything back.
   11 ;; 
   12 ;; I don't really know whether this is the "right" fix, but it seems to
   13 ;; work, and I'm pretty sure that the code this patch deletes does not
   14 ;; work as it stands, so at worst the result after applying this patch
   15 ;; should be no worse than the result without this patch.
   16 ;; 
   17 ;; YMMV.  If this patch breaks, you get to keep both pieces.
   18 
   19 Index: xsl/qandaset.mod.xsl
   20 --- xsl/qandaset.mod.xsl.~1~	Sun Jan  4 08:22:27 2004
   21 +++ xsl/qandaset.mod.xsl	Fri Apr  1 22:30:20 2005
   22 @@ -363,53 +363,4 @@
   23  	</doc:template>
   24  	<xsl:template match="revhistory" mode="qandatoc.mode"/>
   25  
   26 -<xsl:template name="question.answer.label">
   27 -	<!-- variable: deflabel -->
   28 -  <xsl:variable name="deflabel">
   29 -  	<!-- check whether someone has a defaultlabel attribute -->
   30 -    <xsl:choose>
   31 -		<xsl:when test="ancestor-or-self::*[@defaultlabel]">
   32 -        	<xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]/@defaultlabel"/>
   33 -	      </xsl:when>
   34 -      <xsl:otherwise>
   35 -        <xsl:value-of select="latex.qanda.defaultlabel"/>
   36 -      </xsl:otherwise>
   37 -    </xsl:choose>
   38 -  </xsl:variable>
   39 -
   40 -  <xsl:variable name="label" select="@label"/>
   41 -  <xsl:choose>
   42 -    <xsl:when test="$deflabel = 'qanda'">
   43 -      <xsl:call-template name="gentext">
   44 -        <xsl:with-param name="key">
   45 -          <xsl:choose>
   46 -            <xsl:when test="local-name(.) = 'question'">question</xsl:when>
   47 -            <xsl:when test="local-name(.) = 'answer'">answer</xsl:when>
   48 -            <xsl:when test="local-name(.) = 'qandadiv'">qandadiv</xsl:when>
   49 -            <xsl:otherwise>qandaset</xsl:otherwise>
   50 -          </xsl:choose>
   51 -        </xsl:with-param>
   52 -      </xsl:call-template>
   53 -    </xsl:when>
   54 -    <xsl:when test="$deflabel = 'label'">
   55 -      <xsl:value-of select="$label"/>
   56 -    </xsl:when>
   57 -    <xsl:when test="$deflabel = 'number' and local-name(.) = 'question'">
   58 -      <xsl:apply-templates select="ancestor::qandaset[1]" mode="number"/>
   59 -      <xsl:choose>
   60 -        <xsl:when test="ancestor::qandadiv">
   61 -          <xsl:apply-templates select="ancestor::qandadiv[1]" mode="number"/>
   62 -          <xsl:apply-templates select="ancestor::qandaentry" mode="number"/>
   63 -        </xsl:when>
   64 -        <xsl:otherwise>
   65 -          <xsl:apply-templates select="ancestor::qandaentry" mode="number"/>
   66 -        </xsl:otherwise>
   67 -      </xsl:choose>
   68 -    </xsl:when>
   69 -    <xsl:otherwise>
   70 -      <!-- nothing -->
   71 -    </xsl:otherwise>
   72 -  </xsl:choose>
   73 -</xsl:template>
   74 -
   75  </xsl:stylesheet>