Changes made by XMLmind to the docbook-xsl-1.79.1 distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 (DocBook 5: replace docbook-xsl-1.79.1 by docbook-xsl-ns-1.79.1)

  [1] mv docbook/xsl docbook/OLDxsl

      mv docbook/docbook-xsl-saxon.jar docbook/OLDdocbook-xsl-saxon.jar

  [2] tar zxvf /tmp/docbook-xsl-1.79.1.tar.gz

      mv docbook-xsl-1.79.1 docbook/xsl

      cd docbook/xsl

  [3] rm -rf assembly \
AUTHORS \
BUGS \
catalog.xml \
doc \
docsrc \
epub \
epub3 \
INSTALL \
install.sh \
log \
Makefile \
manpages \
NEWS \
NEWS.html \
NEWS.xml \
RELEASE-NOTES.pdf \
RELEASE-NOTES-TMP.xml \
RELEASE-NOTES.txt \
RELEASE-NOTES.xml \
REVISION \
roundtrip \
slides \
svn-commit.tmp \
tests \
TODO \
tools \
webhelp \
website

      find . -name 'build*.xml' -print -exec rm {} \;

  [4] mv extensions/saxon65.jar ../docbook-xsl-saxon.jar

      rm -rf extensions/

      DocBook 5: docbook-xsl-saxon.jar not useful. Already present in
      ../docbook/. However, !!!!!! MAKE SURE TO DELETE extensions/ !!!!!!

  [5] cp -r ../OLDxsl/css/ .

  [6] rm -r ./images ; cp -r ../OLDxsl/images/ .
      
  [7] cd html/

      Changed param.xsl: 

        * callout.graphics from 1 to 0

        * make.clean.html from 0 to 1 
          (no <p><b></b></p> for headings)
        * docbook.css.source from "docbook.css.xml" to "" 
          (no useless docbook.css)

        * navig.graphics.extension from .gif to .png

        * Change all
          http://docbook.sourceforge.net/release/images/XXX to
          images/XXX

      Changed verbatim.xsl:

+---+
<!-- XSLTHL highlighting is turned off by default. See highlighting/README
     for instructions on how to turn on XSLTHL -->
<xsl:template name="apply-highlighting">
    <xsl:apply-templates/>
</xsl:template>
+---+

      becomes:

+---+
<xsl:include href="highlight.xsl"/>
+---+

      Copy CHANGES_MADE_BY_XMLMIND/html/highlight.xsl to html/

      Changed formal.xsl: formal.object.break.after from 1 to 0 
      (no <br> after example, figure, etc)

      Changed graphics.xsl: support of parameter img.src.path:
      juste like a filename starting with 'file:/',
      a filename starting with 'data:' is NOT relative:
           
+---+
                        not(starts-with($filename, 'file:/')) and
                        not(starts-with($filename, 'data:')) and
+---+
           
  [8] cd xhtml/, same changes as in html/. 

      cd xhtml-1_1/, same changes as in xhtml/.

      cd xhtml5/, workaround for 2 bugs in xhtml-profile-docbook.xsl:

          [a] Add:

+---+
<xsl:include href="../xhtml/its.xsl"/>
<xsl:include href="../xhtml/publishers.xsl"/>
+---+

          [b] DocBook 5 ONLY. Change:

+---+
<xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. add...
+---+

              to:

+---+
<xslo:choose><xslo:when test="*/self::ng:* or not(*/self::db:*)"><xslo:message>Note: namesp. add...
+---+

      cd htmlhelp/

          Add to htmlhelp-common.xsl, profile-htmlhelp-common.xsl:

+---+
<xsl:param name="chunker.output.doctype-public" 
           select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
<xsl:param name="chunker.output.doctype-system" 
           select="'http://www.w3.org/TR/html4/loose.dtd'"/>
+---+

         Reason: the CHM viewer emulates IE7. Without a <!DOCTYPE>
         IE7 does not support CSS :first-child. (:last-child not supported.)

  [9] cd fo/

       Miscellaneous enhancements:

         * Copy CHANGES_MADE_BY_XMLMIND/fo/xfc.xsl,alt_param.xsl to fo/
           DocBook 5:
           Copy CHANGES_MADE_BY_XMLMIND/5fo/xfc.xsl,alt_param.xsl to fo/

         * Add <xsl:include href="xfc.xsl"/> to docbook.xsl, 
           profile-docbook.xsl.

         * Rename docbook.xsl as stock_docbook.xsl,
           profile-docbook.xsl as stock_profile-docbook.xsl

         * Copy CHANGES_MADE_BY_XMLMIND/fo/docbook.xsl,profile-docbook.xsl
           to fo/
           DocBook 5:
           Copy CHANGES_MADE_BY_XMLMIND/5fo/docbook.xsl,profile-docbook.xsl
           to fo/

       Changed param.xsl: 

         * Same as in html/.

         * admon.graphics.extension from .png to .svg

         * body.start.indent from 4pc to 0pt 

         * Title fonts are much too big (qanda.title.level1.properties,
           section.title.level1.properties, etc). 
           Change max factor from 2.0736 to 1.728.

         * Added to monospace.properties (included by 
           monospace.verbatim.properties)

+---+
  <xsl:attribute name="font-size">0.83em</xsl:attribute>
+---+

         * In xsl:attribute-set name="shade.verbatim.style", replaced:
+---+
  <xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
+---+

           by:

+---+
  <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+---+

        * In xsl:attribute-set name="sidebar.properties", replaced:
+---+
  <xsl:attribute name="border-width">1pt</xsl:attribute>
  <xsl:attribute name="background-color">#DDDDDD</xsl:attribute>
+---+

           by:

+---+
  <xsl:attribute name="border-width">0.5pt</xsl:attribute>
  <xsl:attribute name="background-color">#F0F0F8</xsl:attribute>
  <!-- "always" is too strictly implemented by FOP. -->
  <xsl:attribute name="keep-together.within-column">1000</xsl:attribute>
+---+

       Changed verbatim.xsl same as in html/.

       Copy CHANGES_MADE_BY_XMLMIND/fo/highlight.xsl to fo/

       Enhanced orderedlists:

         * Insert 

+---+
        <xsl:call-template name="xfcLabelFormat">
          <xsl:with-param name="userLabelWidth" select="$label-width"/>
        </xsl:call-template>
+---+

           in lists.xsl, twice, after each 
           <xsl:attribute name="provisional-distance-between-starts">

         * Test this using CHANGES_MADE_BY_XMLMIND/fo/test_fo_xfc.xml
           DocBook 5: CHANGES_MADE_BY_XMLMIND/5fo/test_fo_xfc.db5.xml

       Added <xsl:call-template name="xfcRenderAsTable"/> to 
       <xsl:template match="sidebar"> in block.xsl:

+---+
      <xsl:variable name="content">
        <fo:block xsl:use-attribute-sets="sidebar.properties"
                  id="{$id}">
          <xsl:call-template name="xfcRenderAsTable"/>

          <xsl:call-template name="sidebar.titlepage"/>
+---+

       Changed admon.xsl:

         * in mode="admon.graphic.width", replaced 36pt by 24pt

         * Called "xfcRenderNoteAsTable" in templates "graphical.admonition" and
           "nongraphical.admonition".

+---+
  <fo:block id="{$id}"
            xsl:use-attribute-sets="graphical.admonition.properties">
    <xsl:call-template name="xfcRenderNoteAsTable"/>

    <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
                    provisional-label-separation="18pt">
+---+

       Changed table.xsl:

         * table-layout="auto" may be supported by some FO processors,
           unfortunately it is not supported by Saxon extension
           com.nwalsh.saxon.Table#adjustColumnWidths().

           Reverted to $table.width=100% when $explicit.table.width and
           $default.table.width are not specified.

+---+
      <xsl:when test="$default.table.width = ''">
        <xsl:text>100%</xsl:text>
      </xsl:when>
+---+

        * Added to xsl:template name="table.row.properties":

+---+
  <xsl:if test="ancestor::thead or ancestor::tfoot">
    <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
  </xsl:if>
+---+

          before xsl:variable name="bgcolor". 
           DocBook 5: test="ancestor::d:thead or ancestor::d:tfoot"

       In autotoc.xsl, added inside 2 <fo:leader>s:

+---+
        <xsl:call-template name="xfcTabAttributes"/>
+---+

       Changed graphics.xsl:

         * Support of parameter img.src.path: juste like a filename
           starting with 'file:/', a filename starting with 'data:'
           is NOT relative:
           
+---+
                        not(starts-with($filename, 'file:/')) and
                        not(starts-with($filename, 'data:')) and
+---+
           
         * Changed template image.content.type as follows. 
           The comments below explain why.

+---+
<xsl:template name="image.content.type">
  <!-- Do not convert @format to a content-type attribute when
       the graphics file has an extension.
       This is incompatible with the fact that XXE can convert 
       on the fly between different image formats. -->

  <xsl:variable name="ext">
    <xsl:if test="@fileref">
      <xsl:call-template name="filename-extension">
        <xsl:with-param name="filename" select="@fileref"/>
      </xsl:call-template>
    </xsl:if>
  </xsl:variable>

  <xsl:if test="@format and $ext = ''">
    <xsl:call-template name="graphic.format.content-type">
      <xsl:with-param name="format" select="@format"/>
    </xsl:call-template>
  </xsl:if>
</xsl:template>
+---+

         * If scalefit=1 and both width and depth are specified, 
           both content-width and content-height must be set to
           scale-to-fit. If content-width is set to scale-to-fit and
           content-height is left to auto, XEP does not fit the image in the
           viewport but just adjusts the height to the width of the viewport
           in order to preserve the aspect ratio of the image. (XEP behavior
           does not seem nonsensical.)

           This required replacing template image.scalefit by two templates
           image.scalefitwidth and image.scalefitdepth.

+---+
<xsl:template name="image.scalefitwidth">
  <xsl:choose>
    <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
    <xsl:when test="@contentwidth">0</xsl:when>
    <xsl:when test="@scale">0</xsl:when>
    <xsl:when test="(@width or $default.image.width != '') and @scalefit">
      <xsl:value-of select="@scalefit"/>
    </xsl:when>
    <xsl:otherwise>0</xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template name="image.scalefitdepth">
  <xsl:choose>
    <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
    <xsl:when test="@contentdepth">0</xsl:when>
    <xsl:when test="@scale">0</xsl:when>
    <xsl:when test="@depth and @scalefit">
      <xsl:value-of select="@scalefit"/>
    </xsl:when>
    <xsl:otherwise>0</xsl:otherwise>
  </xsl:choose>
</xsl:template>
+---+

           Invoke the above templates:

+---+
  <xsl:variable name="scalefitwidth">
    <xsl:call-template name="image.scalefitwidth"/>
  </xsl:variable>
  <xsl:variable name="scalefitdepth">
    <xsl:call-template name="image.scalefitdepth"/>
  </xsl:variable>
  ...
  <xsl:variable name="content.width">
    <xsl:call-template name="image.content.width">
      <xsl:with-param name="scalefit" select="$scalefitwidth"/>
      <xsl:with-param name="scale" select="$scale"/>
    </xsl:call-template>
  </xsl:variable>

  <xsl:variable name="content.height">
    <xsl:call-template name="image.content.height">
      <xsl:with-param name="scalefit" select="$scalefitdepth"/>
      <xsl:with-param name="scale" select="$scale"/>
    </xsl:call-template>
  </xsl:variable>
+---+

  [10] Update catalog.xml

* Alternate epub and webhelp style sheets:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  [1] rm -rf epub; cp -r CHANGES_MADE_BY_XMLMIND/epub epub

      (DocBook 5: copy ../../docbook/xsl/CHANGES_MADE_BY_XMLMIND/5epub.)

  [2] Modifications made to xhtml-1_1/

      [docbook.xsl] Changed:

---
<xsl:output method="xml" encoding="UTF-8" indent="no" 
  doctype-public="-//W3C//DTD XHTML 1.1//EN" 
  doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
---

          to:

---
<xsl:output method="xml" encoding="UTF-8" indent="no" />
---

          This is needed to be able to generate .opf and .ncx files not having
          a XHTML 1.1 doctype. Doing this does not prevent generated XHTML 1.1
          files from having XHTML 1.1 doctype (this is specified in
          chunker.xsl).

      [graphics.xsl] Attribute alt is required for elements such as img. So
          automatically generate something sensible for this attribute.

          in:

---
          <xsl:call-template name="process.image.attributes">
            <xsl:with-param name="alt">
              <xsl:choose>
              ...
---

          add:

---
                <xsl:otherwise>
                  <!-- alt is a required attribute -->
                  <xsl:call-template name="filename-basename">
                    <xsl:with-param name="filename" select="$filename"/>
                  </xsl:call-template>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:with-param>
---

  [3] rm -rf webhelp; cp -r CHANGES_MADE_BY_XMLMIND/webhelp webhelp

      (DocBook 5: copy ../../docbook/xsl/CHANGES_MADE_BY_XMLMIND/5webhelp.)

