]> granicus.if.org Git - docbook-dsssl/commitdiff
Strip out dots from the release name before using it (it gets put
authorMichael Smith <xmldoc@users.sourceforge.net>
Sun, 26 Mar 2006 01:33:03 +0000 (01:33 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Sun, 26 Mar 2006 01:33:03 +0000 (01:33 +0000)
into ID attributes, so it must be an NCName).

xsl/docsrc/release-notes.xsl

index 2dc76bb2b6e6e9e6086a02f84fdafd9a8160bac7..c96141a29300108461ebf7f6a9e246e255ac744e 100644 (file)
   <!-- *   http://www.red-bean.com/cvs2cl/ -->
 
   <xsl:param name="release-version"/>
+  <xsl:param name="release-version-ncname">
+    <xsl:text>V</xsl:text>
+    <xsl:value-of select="translate($release-version, '.', '')"/>
+  </xsl:param>
   <xsl:param name="latest-tag">VXXXX</xsl:param>
   <!-- * We get the value of $previous-release by chopping up the latest -->
   <!-- * tag, then putting it back together. With dots. -->
   <xsl:template match="cvs:changelog">
     <article>
       <xsl:text>&#xa;</xsl:text>
-      <title>Changes since the
-      <xsl:text>&#xa;</xsl:text>
-      <xsl:value-of select="$previous-release"/> release</title>
+      <title
+          >Changes since the <xsl:value-of
+          select="$previous-release"/> release</title>
+      <xsl:text>&#xa;</xsl:text> 
       <sect1>
         <xsl:attribute
             name="xml:id"><xsl:value-of
-            select="$release-version"/></xsl:attribute>
+            select="$release-version-ncname"/></xsl:attribute>
         <xsl:text>&#xa;</xsl:text>
-        <title>Release: <xsl:value-of select="$release-version"/></title>
+        <title>Release: <xsl:value-of select="$release-version-ncname"/></title>
         <xsl:text>&#xa;</xsl:text>
         <para>The following is a list of changes that have been made
         since the <xsl:value-of select="$previous-release"/> release.</para>
         <!-- * subsection name; for example, xml:id="snapshost_FO" -->
         <xsl:attribute
             name="xml:id"><xsl:value-of
-            select="$release-version"/>_<xsl:value-of select="$subsection"/></xsl:attribute>
+            select="$release-version-ncname"/>_<xsl:value-of select="$subsection"/></xsl:attribute>
         <xsl:text>&#xa;</xsl:text>
         <title><xsl:attribute
             name="xml:id"><xsl:value-of
-            select="$release-version"/>_<xsl:value-of
+            select="$release-version-ncname"/>_<xsl:value-of
             select="$subsection"/>_title</xsl:attribute><xsl:value-of
             select="$subsection"/></title>
         <xsl:text>&#xa;</xsl:text>
       <!-- * for example, "end of FO changes for V1691" -->
       <xsl:comment>end of <xsl:value-of
       select="$subsection"/> changes for <xsl:value-of
-      select="$release-version"/></xsl:comment>
+      select="$release-version-ncname"/></xsl:comment>
       <xsl:text>&#xa;</xsl:text>
       <xsl:text>&#xa;</xsl:text>
       <xsl:call-template name="format.subsection">