html5/spec-author-view/tools postprocess-complete.xsl,1.1,1.2 postprocess.xsl,1.1,1.2

Update of /sources/public/html5/spec-author-view/tools
In directory hutz:/tmp/cvs-serv14184/tools

Modified Files:
	postprocess-complete.xsl postprocess.xsl 
Log Message:
fixed problem caused by annoying RCS keyword expansion


Index: postprocess-complete.xsl
===================================================================
RCS file: /sources/public/html5/spec-author-view/tools/postprocess-complete.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- postprocess-complete.xsl	8 Jul 2010 07:46:07 -0000	1.1
+++ postprocess-complete.xsl	8 Jul 2010 13:36:05 -0000	1.2
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" version="1.0">
-  <xsl:output method="html" indent="no"/>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" exclude-result-prefixes="xi h" version="1.0">
+  <xsl:param name="RCSREVISION"/>
+  <xsl:output method="html" indent="no" encoding="UTF-8"/>
   <xsl:key name="local-frags" match="." use="concat('#',@id)"/>
   <xsl:key name="filename-map" match="." use="h:li"/>
   <xsl:template match="node() | @*">
@@ -8,8 +9,23 @@
       <xsl:apply-templates select="@* | node()"/>
     </xsl:copy>
   </xsl:template>
+  <xsl:template match="head">
+    <head>
+      <xsl:for-each select="node()"/>
+      <xsl:copy>
+        <xsl:apply-templates/>
+      </xsl:copy>
+      <link href="style.css" rel="stylesheet"/>
+    </head>
+  </xsl:template>
   <xsl:template match="h1">
-    <h1>HTML5 (Edition for Web Authors)</h1>
+    <h1>
+      <xsl:text>HTML5 (Edition for Web Authors)</xsl:text>
+      <span class="rcsrevision">
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="concat('revision ',$RCSREVISION)"/>
+      </span>
+    </h1>
   </xsl:template>
   <xsl:template match="title">
     <title>HTML5 (Edition for Web Authors)</title>
@@ -27,29 +43,17 @@
     <a href="{$href}"><xsl:value-of select="$href"/></a>
   </xsl:template>
   <xsl:template match="p[contains(normalize-space(.),'This specification is available in the following formats')]">
-    <xsl:copy-of select="@*"/>
-    <xsl:for-each select="node()">
-      <xsl:choose>
-        <xsl:when test="normalize-space(.) = 'single page HTML'">
-          <a href="spec.html">single page HTML</a>
-        </xsl:when>
-        <xsl:when test="normalize-space(.) = 'multipage HTML'">
-          <a href="Overview.html">multipage HTML</a>
-        </xsl:when>
-        <xsl:when test="normalize-space(.) = 'author edition'">
-          <a href="http://dev.w3.org/html5/spec/">full specification</a>
-        </xsl:when>
-        <xsl:when test="starts-with(normalize-space(.),'. This is revision $Revision: ')">
-          <xsl:text>. This is revision </xsl:text>
-          <xsl:value-of select="concat(substring-before(substring-after(normalize-space(.),'. This is revision $Revision$.'),'.')"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy>
-            <xsl:apply-templates/>
-          </xsl:copy>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
+    <p>
+      <xsl:text>This specification is available in the following formats: </xsl:text>
+      <a href="spec.html">single page HTML</a>
+      <xsl:text>, </xsl:text>
+      <a href="Overview.html">multipage HTML</a>
+      <xsl:text>, </xsl:text>
+      <a href="http://dev.w3.org/html5/spec/">full specification</a>.
+      <xsl:text>This is revision </xsl:text>
+      <xsl:value-of select="$RCSREVISION"/>
+      <xsl:text>.</xsl:text>
+    </p>
   </xsl:template>
   <xsl:template match="h2[@id='abstract']">
     <xsl:copy-of select="."/>

Index: postprocess.xsl
===================================================================
RCS file: /sources/public/html5/spec-author-view/tools/postprocess.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- postprocess.xsl	8 Jul 2010 07:46:08 -0000	1.1
+++ postprocess.xsl	8 Jul 2010 13:36:05 -0000	1.2
@@ -1,8 +1,10 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:h="http://www.w3.org/1999/xhtml"
   xmlns:xi="http://www.w3.org/2001/XInclude"
+  exclude-result-prefixes="xi h"
   version='1.0'>
-  <xsl:output method="html" indent="no"/>
+  <xsl:param name="RCSREVISION"/>
+  <xsl:output method="html" indent="no" encoding="UTF-8"/>
   <xsl:key name="local-frags" match="." use="concat('#',@id)"/>
   <xsl:key name="filename-map" match="." use="h:li"/>
   <xsl:template match="node() | @*">
@@ -10,8 +12,23 @@
       <xsl:apply-templates select="@* | node()"/>
     </xsl:copy>
   </xsl:template>
+  <xsl:template match="head">
+    <head>
+      <xsl:for-each select="node()"/>
+      <xsl:copy>
+        <xsl:apply-templates/>
+      </xsl:copy>
+      <link href="style.css" rel="stylesheet"/>
+    </head>
+  </xsl:template>
   <xsl:template match="h1">
-    <h1>HTML5 (Edition for Web Authors)</h1>
+    <h1>
+      <xsl:text>HTML5 (Edition for Web Authors)</xsl:text>
+      <span class="rcsrevision">
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="concat('revision ',$RCSREVISION)"/>
+      </span>
+    </h1>
   </xsl:template>
   <xsl:template match="title">
     <title>HTML5 (Edition for Web Authors)</title>
@@ -32,29 +49,17 @@
     <a href="{$href}"><xsl:value-of select="$href"/></a>
   </xsl:template>
   <xsl:template match="p[contains(normalize-space(.),'This specification is available in the following formats')]">
-    <xsl:copy-of select="@*"/>
-    <xsl:for-each select="node()">
-      <xsl:choose>
-        <xsl:when test="normalize-space(.) = 'single page HTML'">
-          <a href="spec.html">single page HTML</a>
-        </xsl:when>
-        <xsl:when test="normalize-space(.) = 'multipage HTML'">
-          <a href="Overview.html">multipage HTML</a>
-        </xsl:when>
-        <xsl:when test="normalize-space(.) = 'author edition'">
-          <a href="http://dev.w3.org/html5/spec/">full specification</a>
-        </xsl:when>
-        <xsl:when test="starts-with(normalize-space(.),'. This is revision $Revision: ')">
-          <xsl:text>. This is revision </xsl:text>
-          <xsl:value-of select="concat(substring-before(substring-after(normalize-space(.),'. This is revision $Revision$.'),'.')"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:copy>
-            <xsl:apply-templates/>
-          </xsl:copy>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
+    <p>
+      <xsl:text>This specification is available in the following formats: </xsl:text>
+      <a href="spec.html">single page HTML</a>
+      <xsl:text>, </xsl:text>
+      <a href="Overview.html">multipage HTML</a>
+      <xsl:text>, </xsl:text>
+      <a href="http://dev.w3.org/html5/spec/">full specification</a>.
+      <xsl:text>This is revision </xsl:text>
+      <xsl:value-of select="$RCSREVISION"/>
+      <xsl:text>.</xsl:text>
+    </p>
   </xsl:template>
   <xsl:template match="h2[@id='abstract']">
     <xsl:copy-of select="."/>

Received on Thursday, 8 July 2010 13:36:11 UTC