W3C home > Mailing lists > Public > spec-prod@w3.org > January to March 2002

Bugs in xmlspec.xsl

From: Francois Yergeau <FYergeau@alis.com>
Date: Tue, 12 Mar 2002 12:10:33 -0500
Message-ID: <F7D4BDA0E5A1D14B99D32C022AEB73662E761C@alis-2k.alis.domain>
To: spec-prod@w3.org
Hi all,

I'm looking at the latest version of xmlspec.xsl in CVS (revision 1.18 at
http://dev.w3.org/cvsweb/spec-prod/html/xmlspec.xsl).  I see one obvious bug
and I have a question.

1) The template for prevlocs is:

  <!-- prevlocs: previous locations for this spec -->
  <!-- called in a <dl> context from header -->
  <xsl:template match="prevlocs">
    <dt>
      <xsl:text>Previous version</xsl:text>
      <xsl:if test="count(locs) &gt; 1">s</xsl:if>
      <xsl:text>:</xsl:text>
    </dt>
    <dd>
      <xsl:apply-templates/>
    </dd>
  </xsl:template>

It's a nice idea to add an 's' for multiple <loc>s, but it needs to say
"count(loc)" in the 6th line to work right.


2) The various "divX/head" templates each have code to generate an <a
name=".."> from the id of the div, instead of calling the nice "anchor"
template.  Is there a reason for that?  A downside is that the <a> has
name=".." only, not id=".."

I tried calling "anchor" as follows:

      <xsl:call-template name="anchor">
        <xsl:with-param name="node" select=".."/>
        <xsl:with-param name="conditional" select="0"/>
      </xsl:call-template>

with the expected results and no obvious ill effects.

-- 
François Yergeau
Received on Tuesday, 12 March 2002 12:11:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:19:11 GMT