Ignore:
Timestamp:
11/10/08 07:06:15 (11 years ago)
Author:
julian.reschke@…
Message:

update to latest version of rfc2629.xslt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629toXHTML.xslt

    r308 r329  
    319319  <xsl:call-template name="check-artwork-width">
    320320    <xsl:with-param name="content"><xsl:apply-templates/></xsl:with-param>
     321    <xsl:with-param name="indent"><xsl:value-of select="string-length(@x:indent-with)"/></xsl:with-param>
    321322  </xsl:call-template>
    322323</xsl:template>
     
    338339<xsl:template name="check-artwork-width">
    339340  <xsl:param name="content"/>
     341  <xsl:param name="indent"/>
    340342  <xsl:choose>
    341343    <xsl:when test="not(contains($content,'&#xA;'))">
    342       <xsl:if test="string-length($content) &gt; 69">
     344      <xsl:if test="string-length($content) &gt; 69 + $indent">
    343345        <xsl:call-template name="warning">
    344346          <xsl:with-param name="inline" select="'no'"/>
     
    350352      <xsl:variable name="start" select="substring-before($content,'&#xA;')"/>
    351353      <xsl:variable name="end" select="substring-after($content,'&#xA;')"/>
    352       <xsl:if test="string-length($start) &gt; 69">
     354      <xsl:if test="string-length($start) &gt; 69 + $indent">
    353355        <xsl:call-template name="warning">
    354356          <xsl:with-param name="inline" select="'no'"/>
     
    365367<xsl:template match="artwork[@src and starts-with(@type,'image/')]">
    366368  <p xmlns="http://www.w3.org/1999/xhtml">
    367     <img src="{@src}" alt="{.}">
    368       <xsl:copy-of select="@width|@height"/>
    369     </img>
     369    <xsl:choose>
     370      <xsl:when test="@type='image/svg+xml'">
     371        <object data="{@src}" type="image/svg+xml">
     372          <xsl:choose>
     373            <xsl:when test="@width!='' or @height!=''">
     374              <xsl:copy-of select="@width|@height"/>
     375            </xsl:when>
     376            <xsl:otherwise xmlns:svg="http://www.w3.org/2000/svg">
     377              <!-- try to find width and height from SVG -->
     378              <xsl:variable name="svg" select="document(@src)"/>
     379              <xsl:for-each select="$svg/svg:svg/@width|$svg/svg:svg/@height">
     380                <!-- strip out the units, cross the fingers pixels are meant -->
     381                <xsl:attribute name="{local-name()}">
     382                  <xsl:value-of select="translate(.,concat($ucase,$lcase),'')"/>
     383                </xsl:attribute>
     384              </xsl:for-each>
     385            </xsl:otherwise>
     386          </xsl:choose>
     387          <xsl:apply-templates/>
     388        </object>
     389      </xsl:when>
     390      <xsl:otherwise>
     391        <img src="{@src}" alt="{.}">
     392          <xsl:copy-of select="@width|@height"/>
     393        </img>
     394      </xsl:otherwise>
     395    </xsl:choose>
    370396  </p>
    371397</xsl:template>
     
    522548<xsl:template match="figure">
    523549  <xsl:if test="@anchor!=''">
     550    <xsl:call-template name="check-anchor"/>
    524551    <div xmlns="http://www.w3.org/1999/xhtml" id="{@anchor}"/>
    525552  </xsl:if>
     
    570597  <p xmlns="http://www.w3.org/1999/xhtml" class="title">
    571598    <!-- main title -->
     599
    572600    <xsl:apply-templates select="title"/>
    573601    <xsl:if test="/rfc/@docName">
     
    725753  <!-- Inherited through CSS now <dd style="margin-top: .5em">-->
    726754  <dd xmlns="http://www.w3.org/1999/xhtml">
     755    <xsl:call-template name="copy-anchor"/>
    727756    <xsl:call-template name="insertInsDelClass"/>
    728     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
    729757    <xsl:apply-templates/>
    730758  </dd>
     
    733761<xsl:template match="list[@style='numbers' or @style='symbols' or @style='letters']/x:lt">
    734762  <li xmlns="http://www.w3.org/1999/xhtml">
    735     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     763    <xsl:call-template name="copy-anchor"/>
    736764    <xsl:apply-templates select="t"/>
    737765  </li>
     
    740768<xsl:template match="list[@style='numbers' or @style='symbols' or @style='letters']/t | list[@style='numbers' or @style='symbols' or @style='letters']/ed:replace/ed:*/t">
    741769  <li xmlns="http://www.w3.org/1999/xhtml">
     770    <xsl:call-template name="copy-anchor"/>
    742771    <xsl:call-template name="insertInsDelClass"/>
    743772    <xsl:for-each select="../..">
    744773      <xsl:call-template name="insert-issue-pointer"/>
    745774    </xsl:for-each>
    746     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
    747775    <xsl:apply-templates/>
    748776  </li>
     
    752780  <xsl:if test="@hangText!=''">
    753781    <dt xmlns="http://www.w3.org/1999/xhtml">
     782      <xsl:call-template name="copy-anchor"/>
    754783      <xsl:call-template name="insertInsDelClass"/>
    755784      <xsl:variable name="del-node" select="ancestor::ed:del"/>
     
    761790        </xsl:call-template>
    762791      </xsl:for-each>
    763       <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
    764792      <xsl:value-of select="@hangText"/>
    765793    </dt>
     
    778806  <xsl:if test="@hangText!=''">
    779807    <dt xmlns="http://www.w3.org/1999/xhtml">
     808      <xsl:call-template name="copy-anchor"/>
    780809      <xsl:call-template name="insertInsDelClass"/>
    781810      <xsl:if test="count(preceding-sibling::t)=0">
     
    789818        </xsl:for-each>
    790819      </xsl:if>
    791       <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
    792820      <xsl:value-of select="@hangText"/>
    793821    </dt>
     
    824852  </xsl:variable>
    825853  <dt xmlns="http://www.w3.org/1999/xhtml">
    826     <xsl:if test="@anchor"><xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute></xsl:if>
     854    <xsl:call-template name="copy-anchor"/>
    827855    <xsl:choose>
    828856      <xsl:when test="contains($format,'%c')">
     
    868896  <xsl:if test="normalize-space(.) != ''">
    869897    <p xmlns="http://www.w3.org/1999/xhtml">
    870       <xsl:if test="@anchor">
    871         <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    872       </xsl:if>
     898      <xsl:call-template name="copy-anchor"/>
    873899      <xsl:call-template name="insertInsDelClass"/>
    874900      <xsl:call-template name="editingMark"/>
     
    947973    </xsl:call-template>
    948974  </xsl:if>
     975
     976  <xsl:call-template name="check-anchor"/>
    949977
    950978  <xsl:variable name="target">
     
    11921220  </xsl:variable>
    11931221
    1194   <html xmlns="http://www.w3.org/1999/xhtml" lang="{$lang}">
     1222  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}">
    11951223    <head profile="http://www.w3.org/2006/03/hcard">
    11961224      <title>
     
    12181246      </xsl:for-each>
    12191247      <xsl:if test="/rfc/@number">
    1220         <link rel="Alternate" title="Authorative ASCII version" href="http://www.ietf.org/rfc/rfc{/rfc/@number}.txt"/>
     1248        <xsl:variable name="number">
     1249          <xsl:choose>
     1250            <xsl:when test="string-length(/rfc/@number) &lt; 2">000<xsl:value-of select="/rfc/@number"/></xsl:when>
     1251            <xsl:when test="string-length(/rfc/@number) &lt; 3">00<xsl:value-of select="/rfc/@number"/></xsl:when>
     1252            <xsl:when test="string-length(/rfc/@number) &lt; 4">0<xsl:value-of select="/rfc/@number"/></xsl:when>
     1253            <xsl:otherwise><xsl:value-of select="/rfc/@number"/></xsl:otherwise>
     1254          </xsl:choose>
     1255        </xsl:variable>
     1256        <link rel="Alternate" title="Authorative ASCII Version" href="http://www.ietf.org/rfc/rfc{/rfc/@number}.txt"/>
     1257        <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc{$number}"/>
    12211258      </xsl:if>
    12221259
     
    13411378</xsl:template>               
    13421379
     1380<xsl:template mode="t-content2" match="comment()">
     1381  <xsl:apply-templates select="."/>
     1382  <xsl:if test="not(following-sibling::node()[1] [self::list or self::figure or self::texttable])">
     1383    <xsl:apply-templates select="following-sibling::node()[1]" mode="t-content2"/>
     1384  </xsl:if>
     1385</xsl:template>               
     1386
    13431387<xsl:template match="title">
     1388  <xsl:if test="@abbrev and string-length(@abbrev) &gt; 40">
     1389    <xsl:call-template name="warning">
     1390      <xsl:with-param name="inline" select="'no'"/>
     1391      <xsl:with-param name="msg">title/@abbrev too long (max 40 characters)</xsl:with-param>
     1392    </xsl:call-template>
     1393  </xsl:if>
     1394
     1395  <xsl:if test="string-length(.) &gt; 40 and (not(@abbrev) or @abbrev='')">
     1396    <xsl:call-template name="warning">
     1397      <xsl:with-param name="inline" select="'no'"/>
     1398      <xsl:with-param name="msg">title too long, should supply title/@abbrev attribute with less than 40 characters</xsl:with-param>
     1399    </xsl:call-template>
     1400  </xsl:if>
     1401
    13441402  <xsl:apply-templates/>
    13451403</xsl:template>
     
    14341492    <xsl:choose>
    14351493      <xsl:when test="@anchor">
     1494        <xsl:call-template name="check-anchor"/>
    14361495        <a xmlns="http://www.w3.org/1999/xhtml" id="{@anchor}" href="#{@anchor}"><xsl:call-template name="insertTitle"/></a>
    14371496      </xsl:when>
     
    14471506<xsl:template match="spanx[@style='emph' or not(@style)]">
    14481507  <em xmlns="http://www.w3.org/1999/xhtml">
    1449     <xsl:if test="@anchor">
    1450       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    1451     </xsl:if>
     1508    <xsl:call-template name="copy-anchor"/>
    14521509    <xsl:apply-templates/>
    14531510  </em>
     
    14561513<xsl:template match="spanx[@style='verb']">
    14571514  <samp xmlns="http://www.w3.org/1999/xhtml">
    1458     <xsl:if test="@anchor">
    1459       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    1460     </xsl:if>
     1515    <xsl:call-template name="copy-anchor"/>
    14611516    <xsl:apply-templates/>
    14621517  </samp>
     
    14651520<xsl:template match="spanx[@style='strong']">
    14661521  <strong xmlns="http://www.w3.org/1999/xhtml">
    1467     <xsl:if test="@anchor">
    1468       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    1469     </xsl:if>
     1522    <xsl:call-template name="copy-anchor"/>
    14701523    <xsl:apply-templates/>
    14711524  </strong>
     
    15891642    <xsl:otherwise>
    15901643      <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"><xsl:apply-templates/></a>
    1591       <xsl:for-each select="$src/rfc/back/references//reference[@anchor=$target]">
    1592         <xsl:text> </xsl:text>
    1593         <cite xmlns="http://www.w3.org/1999/xhtml" title="{normalize-space(front/title)}">
    1594           <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'">
    1595             <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute>
    1596           </xsl:if>
    1597           <xsl:call-template name="referencename">
    1598              <xsl:with-param name="node" select="."/>
    1599           </xsl:call-template>
    1600         </cite>
    1601       </xsl:for-each>
     1644      <xsl:if test="not(@format='none')">
     1645        <xsl:for-each select="$src/rfc/back/references//reference[@anchor=$target]">
     1646          <xsl:text> </xsl:text>
     1647          <cite xmlns="http://www.w3.org/1999/xhtml" title="{normalize-space(front/title)}">
     1648            <xsl:if test="$xml2rfc-ext-include-references-in-index='yes'">
     1649              <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute>
     1650            </xsl:if>
     1651            <xsl:call-template name="referencename">
     1652               <xsl:with-param name="node" select="."/>
     1653            </xsl:call-template>
     1654          </cite>
     1655        </xsl:for-each>
     1656      </xsl:if>
    16021657    </xsl:otherwise>
    16031658  </xsl:choose>
     
    21162171<xsl:template name="insertAuthors">
    21172172
    2118   <xsl:call-template name="insert-conditional-hrule"/>
    2119  
    21202173  <xsl:variable name="number">
    21212174    <xsl:call-template name="get-authors-section-number"/>
    21222175  </xsl:variable>
    21232176   
    2124   <h1 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.authors">
    2125     <xsl:call-template name="insert-conditional-pagebreak"/>
    2126     <xsl:if test="$number != ''">
    2127       <a href="#{$anchor-prefix}.section.{$number}" id="{$anchor-prefix}.section.{$number}"><xsl:value-of select="$number"/>.</a>
    2128       <xsl:text> </xsl:text>
    2129     </xsl:if>
    2130     <a href="#{$anchor-prefix}.authors"><xsl:call-template name="get-authors-section-title"/></a>
    2131   </h1>
    2132 
    2133   <xsl:apply-templates select="/rfc/front/author"/>
     2177  <xsl:if test="$number!='suppress'">
     2178    <xsl:call-template name="insert-conditional-hrule"/>
     2179   
     2180    <h1 xmlns="http://www.w3.org/1999/xhtml" id="{$anchor-prefix}.authors">
     2181      <xsl:call-template name="insert-conditional-pagebreak"/>
     2182      <xsl:if test="$number != ''">
     2183        <a href="#{$anchor-prefix}.section.{$number}" id="{$anchor-prefix}.section.{$number}"><xsl:value-of select="$number"/>.</a>
     2184        <xsl:text> </xsl:text>
     2185      </xsl:if>
     2186      <a href="#{$anchor-prefix}.authors"><xsl:call-template name="get-authors-section-title"/></a>
     2187    </h1>
     2188 
     2189    <xsl:apply-templates select="/rfc/front/author"/>
     2190  </xsl:if>
    21342191</xsl:template>
    21352192
     
    23512408cite {
    23522409  font-style: normal;
    2353 }
     2410}<xsl:if test="//x:note">
     2411div.note {
     2412  margin-left: 2em;
     2413}</xsl:if>
    23542414dd {
    23552415  margin-right: 2em;<xsl:if test="$xml2rfc-ext-justification='always'">
     
    34363496<xsl:template match="front" mode="toc">
    34373497 
    3438   <li xmlns="http://www.w3.org/1999/xhtml">
    3439     <xsl:variable name="authors-title">
    3440       <xsl:call-template name="get-authors-section-title"/>
    3441     </xsl:variable>
    3442     <xsl:variable name="authors-number">
    3443       <xsl:call-template name="get-authors-section-number"/>
    3444     </xsl:variable>
    3445     <xsl:call-template name="insert-toc-line">
    3446       <xsl:with-param name="target" select="concat($anchor-prefix,'.authors')"/>
    3447       <xsl:with-param name="title" select="$authors-title"/>
    3448       <xsl:with-param name="number" select="$authors-number"/>
    3449     </xsl:call-template>
    3450   </li>
     3498  <xsl:variable name="authors-title">
     3499    <xsl:call-template name="get-authors-section-title"/>
     3500  </xsl:variable>
     3501  <xsl:variable name="authors-number">
     3502    <xsl:call-template name="get-authors-section-number"/>
     3503  </xsl:variable>
     3504
     3505  <xsl:if test="$authors-number!='suppress'">
     3506    <li xmlns="http://www.w3.org/1999/xhtml">
     3507      <xsl:call-template name="insert-toc-line">
     3508        <xsl:with-param name="target" select="concat($anchor-prefix,'.authors')"/>
     3509        <xsl:with-param name="title" select="$authors-title"/>
     3510        <xsl:with-param name="number" select="$authors-number"/>
     3511      </xsl:call-template>
     3512    </li>
     3513  </xsl:if>
    34513514
    34523515</xsl:template>
     
    37033766  <xsl:choose>
    37043767    <xsl:when test="starts-with($name,'draft-')">
    3705       <xsl:if test="count(//references//reference/seriesInfo[@name='Internet-Draft' and @value=$name])=0">
     3768      <xsl:if test="not(//references//reference/seriesInfo[@name='Internet-Draft' and @value=$name])">
    37063769        <xsl:call-template name="warning">
    37073770          <xsl:with-param name="inline" select="'no'"/>
     
    37113774    </xsl:when>
    37123775    <xsl:otherwise>
    3713       <xsl:if test="count(//references//reference/seriesInfo[@name='RFC' and @value=$name])=0">
     3776      <xsl:if test="not(//references//reference/seriesInfo[@name='RFC' and @value=$name])">
    37143777        <xsl:call-template name="warning">
    37153778          <xsl:with-param name="inline" select="'no'"/>
     
    37213784</xsl:template>
    37223785
     3786<xsl:template name="check-anchor">
     3787  <xsl:if test="@anchor and @anchor!=''">
     3788    <!-- check validity of anchor name -->
     3789    <xsl:variable name="test">
     3790      <xsl:element namespace="http://www.w3.org/1999/xhtml" name="{@anchor}"/>
     3791    </xsl:variable>
     3792    <xsl:if test="count(exslt:node-set($test)//*) = 0">
     3793      <xsl:call-template name="error">
     3794        <xsl:with-param name="msg" select="concat('&#34;',@anchor,'&#34; is not a valid XML name')"/>
     3795      </xsl:call-template>
     3796    </xsl:if>
     3797  </xsl:if>
     3798</xsl:template>
     3799
     3800<xsl:template name="copy-anchor">
     3801  <xsl:call-template name="check-anchor"/>
     3802  <xsl:if test="@anchor and @anchor!=''">
     3803    <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
     3804  </xsl:if>
     3805</xsl:template>
     3806
    37233807<xsl:template name="rfclist-for-dcmeta">
    37243808  <xsl:param name="list"/>
     
    37403824<xsl:template name="get-paragraph-number">
    37413825  <!-- get section number of ancestor section element, then add t or figure number -->
    3742   <xsl:if test="ancestor::section and not(ancestor::section[@myns:unnumbered='unnumbered']) and not(ancestor::x:blockquote)">
    3743     <xsl:for-each select="ancestor::section[1]"><xsl:call-template name="get-section-number"/>.p.</xsl:for-each><xsl:number count="t|figure|x:blockquote"/>
     3826  <xsl:if test="ancestor::section and not(ancestor::section[@myns:unnumbered='unnumbered']) and not(ancestor::x:blockquote) and not(ancestor::x:note)">
     3827    <xsl:for-each select="ancestor::section[1]"><xsl:call-template name="get-section-number"/>.p.</xsl:for-each><xsl:number count="t|figure|x:blockquote|x:note"/>
    37443828  </xsl:if>
    37453829</xsl:template>
     
    37883872    <xsl:apply-templates/>
    37893873  </q>
     3874</xsl:template>
     3875
     3876<!-- Notes -->
     3877<xsl:template match="x:note">
     3878  <div xmlns="http://www.w3.org/1999/xhtml" class="note">
     3879    <xsl:apply-templates/>
     3880  </div>
    37903881</xsl:template>
    37913882
     
    38353926<xsl:template match="x:dfn">
    38363927  <dfn xmlns="http://www.w3.org/1999/xhtml">
    3837     <xsl:if test="@anchor">
    3838       <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
    3839     </xsl:if>
     3928    <xsl:call-template name="copy-anchor"/>
    38403929    <xsl:apply-templates/>
    38413930  </dfn>
     
    38543943    <xsl:apply-templates/>
    38553944  </sup>
     3945</xsl:template>
     3946
     3947<!-- bold -->
     3948<xsl:template match="x:highlight">
     3949  <b xmlns="http://www.w3.org/1999/xhtml">
     3950    <xsl:apply-templates/>
     3951  </b>
    38563952</xsl:template>
    38573953
     
    40874183</xsl:template>
    40884184
     4185<!-- author handling extensions -->
     4186<xsl:template match="x:include-author">
     4187  <xsl:for-each select="/*/front/author[@anchor=current()/@target]">
     4188    <xsl:apply-templates select="."/>
     4189  </xsl:for-each>
     4190</xsl:template>
     4191
    40894192<!-- experimental annotation support -->
    40904193
     
    43014404 
    43024405  <!-- check anchor names -->
    4303   <xsl:variable name="badAnchors" select="//*[starts-with(@anchor,concat($anchor-prefix,'.'))]"/>
     4406  <xsl:variable name="badAnchors" select="//*[starts-with(@anchor,concat($anchor-prefix,'.'))][@anchor!=concat($anchor-prefix,'.authors') and /*/x:assign-section-number[@number='suppress' and @builtin-target='authors']]"/>
     4407 
    43044408  <xsl:if test="$badAnchors">
    4305     <p xmlns="http://www.w3.org/1999/xhtml" class="warning">
     4409    <xsl:variable name="text">
    43064410      The following anchor names may collide with internally generated anchors because of their prefix "<xsl:value-of select="$anchor-prefix"/>":
    43074411      <xsl:for-each select="$badAnchors">
    43084412        <xsl:value-of select="@anchor"/><xsl:if test="position()!=last()">, </xsl:if>
    43094413      </xsl:for-each>
    4310     </p>
    4311     <xsl:message>
    4312       The following anchor names may collide with internally generated anchors because of their prefix "<xsl:value-of select="$anchor-prefix"/>":
    4313       <xsl:for-each select="$badAnchors">
    4314         <xsl:value-of select="@anchor"/><xsl:if test="position()!=last()">, </xsl:if>
    4315       </xsl:for-each>
    4316     </xsl:message>
     4414    </xsl:variable>
     4415    <xsl:call-template name="warning">
     4416      <xsl:with-param name="msg"><xsl:value-of select="$text"/></xsl:with-param>
     4417    </xsl:call-template>
     4418  </xsl:if>
     4419 
     4420  <!-- check ABNF syntax references -->
     4421  <xsl:if test="//artwork[@type='abnf2616']">
     4422    <xsl:if test="not(//reference/seriesInfo[@name='RFC' and (@value='2068' or @value='2616')])">
     4423      <xsl:call-template name="warning">
     4424        <xsl:with-param name="inline">no</xsl:with-param>
     4425        <xsl:with-param name="msg">document uses HTTP-style ABNF syntax, but doesn't reference RFC 2068 or 2616.</xsl:with-param>
     4426      </xsl:call-template>
     4427    </xsl:if>
     4428  </xsl:if>
     4429  <xsl:if test="//artwork[@type='abnf']">
     4430    <xsl:if test="not(//reference/seriesInfo[@name='RFC' and (@value='2234' or @value='4234' or @value='5234')])">
     4431      <xsl:call-template name="warning">
     4432        <xsl:with-param name="inline">no</xsl:with-param>
     4433        <xsl:with-param name="msg">document uses ABNF syntax, but doesn't reference RFC 2234, 4234 or 5234.</xsl:with-param>
     4434      </xsl:call-template>
     4435    </xsl:if>
    43174436  </xsl:if>
    43184437 
     
    43204439  <xsl:variable name="badTargets" select="//xref[not(@target=//@anchor) and not(ancestor::ed:del)]"/>
    43214440  <xsl:if test="$badTargets">
    4322     <p xmlns="http://www.w3.org/1999/xhtml" class="error">
     4441    <xsl:variable name="text">
    43234442      The following target names do not exist:
    43244443      <xsl:for-each select="$badTargets">
    43254444        <xsl:value-of select="@target"/><xsl:if test="position()!=last()">, </xsl:if>
    43264445      </xsl:for-each>
    4327     </p>
    4328     <xsl:message>
    4329       The following target names do not exist:
    4330       <xsl:for-each select="$badTargets">
    4331         <xsl:value-of select="@target"/><xsl:if test="position()!=last()">, </xsl:if>
    4332       </xsl:for-each>
    4333     </xsl:message>
     4446    </xsl:variable>
     4447    <xsl:call-template name="warning">
     4448      <xsl:with-param name="msg"><xsl:value-of select="$text"/></xsl:with-param>
     4449    </xsl:call-template>
    43344450  </xsl:if>
    43354451 
     
    45824698    </xsl:variable>
    45834699    <table summary="{preamble}" class="{$style}" cellpadding="3" cellspacing="0">
    4584       <thead>
    4585         <tr>
    4586           <xsl:apply-templates select="ttcol"/>
    4587         </tr>
    4588       </thead>
     4700      <xsl:if test="ttcol!=''">
     4701        <!-- skip header when all column titles are empty -->
     4702        <thead>
     4703          <tr>
     4704            <xsl:apply-templates select="ttcol"/>
     4705          </tr>
     4706        </thead>
     4707      </xsl:if>
    45894708      <tbody>
    45904709        <xsl:variable name="columns" select="count(ttcol)"/>
     
    48244943    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    48254944    <!-- when RCS keyword substitution in place, add version info -->
    4826     <xsl:if test="contains('$Revision: 1.387 $',':')">
    4827       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.387 $', 'Revision: '),'$','')),', ')"/>
     4945    <xsl:if test="contains('$Revision: 1.400 $',':')">
     4946      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.400 $', 'Revision: '),'$','')),', ')"/>
    48284947    </xsl:if>
    4829     <xsl:if test="contains('$Date: 2008-08-08 13:06:55 $',':')">
    4830       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-08-08 13:06:55 $', 'Date: '),'$','')),', ')"/>
     4948    <xsl:if test="contains('$Date: 2008-10-10 14:04:14 $',':')">
     4949      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-10-10 14:04:14 $', 'Date: '),'$','')),', ')"/>
    48314950    </xsl:if>
    48324951    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
Note: See TracChangeset for help on using the changeset viewer.