forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schaefer <johannes.schae...@uidesign.de>
Subject Re: svn commit: r358073 - /forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl
Date Tue, 20 Dec 2005 19:46:25 GMT
Do these changes get back to the downloadable version?
  http://forrest.apache.org/mirrors.cgi#closest

Johannes


josch@apache.org schrieb:
> Author: josch
> Date: Tue Dec 20 11:02:37 2005
> New Revision: 358073
> 
> URL: http://svn.apache.org/viewcvs?rev=358073&view=rev
> Log:
> added support for spans in tables, fixes FOR-769
> 
> Modified:
>     forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl
> 
> Modified: forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl
> URL: http://svn.apache.org/viewcvs/forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl?rev=358073&r1=358072&r2=358073&view=diff
> ==============================================================================
> --- forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl
(original)
> +++ forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl
Tue Dec 20 11:02:37 2005
> @@ -621,22 +621,68 @@
>        </xsl:template>
>        <xsl:template match="entry" mode="thead">
>              <th>
> +                  <xsl:call-template name="entry.spans"/>
>                    <xsl:apply-templates/>
>              </th>
>        </xsl:template>
>        <xsl:template match="row">
>              <tr>
> -                  <xsl:apply-templates/>
> +              <xsl:apply-templates/>
>              </tr>
>        </xsl:template>
>        <xsl:template match="tbody|tfoot">
>              <xsl:apply-templates/>
>        </xsl:template>
> +
>        <xsl:template match="entry">
>              <td>
> +                  <xsl:call-template name="entry.spans"/>
>                    <xsl:apply-templates/>
>              </td>
>        </xsl:template>
> +
> +      <xsl:template name="entry.spans">
> +              <xsl:if test="@morerows">
> +                <xsl:attribute name="rowspan">
> +                  <xsl:value-of select="number(@morerows)+1"/>
> +                </xsl:attribute>
> +              </xsl:if>
> +              <xsl:if test="@namest and @nameend">
> +                  <xsl:attribute name="colspan">
> +
> +                  <xsl:variable name="start">
> +                    <xsl:call-template name="colspec.index">
> +                      <xsl:with-param name="olist" select="ancestor::tgroup/colspec"/>
> +                      <xsl:with-param name="colname" select="@namest"/>
> +                    </xsl:call-template>
> +                  </xsl:variable>
> +                  <xsl:variable name="end">
> +                    <xsl:call-template name="colspec.index">
> +                      <xsl:with-param name="olist" select="ancestor::tgroup/colspec"/>
> +                      <xsl:with-param name="colname" select="@nameend"/>
> +                    </xsl:call-template>
> +                  </xsl:variable>
> +
> +                  <xsl:value-of select="number($end)-number($start)+1"/>
> +                </xsl:attribute>
> +              </xsl:if>
> +      </xsl:template>
> +      <xsl:template name="colspec.index">
> +        <!-- calculate the index for a given colname, e.g. from entry/@nameend -->
> +        <!-- inspired from the original docbook stylesheets -->
> +        <xsl:param name="olist" select="//table/tgroup/colspec"/>
> +        <xsl:param name="colname" select="c1"/>
> +        <xsl:for-each select="$olist">
> +          <xsl:if test="@colname=$colname">
> +            <xsl:choose>
> +              <xsl:when test="@colnum"><xsl:value-of select="@colnum"/></xsl:when>
> +              <xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise>
> +            </xsl:choose>
> +          </xsl:if>
> +        </xsl:for-each>
> +      </xsl:template>
> +
> +
>        <xsl:template match="trademark">
>              <xsl:apply-templates/>
>              <sup>TM</sup>
> 
> 
> 


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 *
D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de

Mime
View raw message