[ttml10se] switch to html xslt to resolve extraneous anchors on certain browsers
authorGlenn Adams <glenn@skynav.com>
Thu, 09 May 2013 13:03:57 -0600
changeset 372 e589bfb4a6b4
parent 371 6a216cde200e
child 373 597654332f17
[ttml10se] switch to html xslt to resolve extraneous anchors on certain browsers
ttml10/spec/xmlspec-ttaf1-dfxp.xsl
ttml10/spec/xmlspec.xsl
--- a/ttml10/spec/xmlspec-ttaf1-dfxp.xsl	Thu May 09 10:06:24 2013 -0600
+++ b/ttml10/spec/xmlspec-ttaf1-dfxp.xsl	Thu May 09 13:03:57 2013 -0600
@@ -4,8 +4,10 @@
 <xsl:import href="changelog.xsl"/>
 <xsl:param name="toc.level" select="5"/>
 <xsl:param name="show.ednotes">1</xsl:param>
+<!-- [GA] remove 2013-05-09
 <xsl:param name="show.diff.markup">1</xsl:param>
-<xsl:variable name="output.mode" select="'xhtml'"/>
+-->
+<xsl:variable name="output.mode" select="'html'"/>
 <xsl:param name="additional.css">
 <xsl:text>
 li p { margin-top: 0.3em; margin-bottom: 0.3em; }
@@ -58,144 +60,20 @@
 .reqattr { font-weight: bold }
 .optattr { font-style: italic }
 </xsl:text>
-<xsl:if test="$show.diff.markup != '0'">
-<xsl:text>
-.diff-add  { color: red; background-color: #99FF99; }
-.diff-del  { color: red; text-decoration: line-through; background-color: #99FF99; }
-.diff-chg  { background-color: #99FF99; }
-q.diff-off  {}
-</xsl:text>
-</xsl:if>
 </xsl:param>
-<xsl:output method="xml" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="no"/>
-
-<!-- [GA] removed the following overrides: -->
-<!-- inform-div1[head='Change Log']/p -->
-<!-- bibref -->
-<!-- bibl -->
-<!-- titleref -->
-<!-- emph[@role='infoset-property'] -->
-<!-- ulist[@role='termreference'] -->
-<!-- eg[@role='needs-numbering'] -->
-<!-- addLineNumbers -->
-<!-- lb mode(addLineNumbers) -->
-<!-- node() mode(addLineNumbers) -->
-<!-- code[@role='code-emph'] -->
-<!-- p[@role='practice'] -->
-<!-- p[@role='practice'] mode(number) -->
-<!-- css -->
-<!-- specref -->
+<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" indent="no"/>
 
-<!-- [GA] added the following overrides from old DFXP CR1 spec sources -->
-<!-- diff support -->
-<xsl:template name="diff-markup">
-  <xsl:param name="diff">off</xsl:param>
-  <xsl:choose>
-    <xsl:when test="self::ritem">
-	<xsl:apply-templates select="." mode="diff"/>
-    </xsl:when>
-    <xsl:when test="self::ulist or self::p or self::bibl">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:when test="ancestor-or-self::phrase">
-      <span xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diff}">
-	<xsl:apply-templates/>
-      </span>
-    </xsl:when>
-    <xsl:when test="ancestor::p and not(self::p)">
-      <span xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diff}">
-	<xsl:apply-templates/>
-      </span>
-    </xsl:when>
-    <xsl:when test="ancestor-or-self::affiliation">
-      <span xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diff}">
-	<xsl:apply-templates/>
-      </span>
-    </xsl:when>
-    <xsl:when test="ancestor-or-self::name">
-      <span xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diff}">
-	<xsl:apply-templates/>
-      </span>
-    </xsl:when>
-    <xsl:when test="ancestor-or-self::note">
-      <div xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diff}">
-	<div class="note">
-	  <p class="prefix">
-	    <b>Note:</b>
-	  </p>
-	  <xsl:apply-templates/>
-        </div>
-      </div>
-    </xsl:when>
-    <xsl:otherwise>
-      <div xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diff}">
-	<xsl:apply-templates/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template match="*[@diff='chg']">
-  <xsl:choose>
-    <xsl:when test="$show.diff.markup != 0">
-      <xsl:call-template name="diff-markup">
-	<xsl:with-param name="diff">chg</xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template match="*[@diff='add']">
-  <xsl:choose>
-    <xsl:when test="$show.diff.markup != 0">
-      <xsl:call-template name="diff-markup">
-	<xsl:with-param name="diff">add</xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template match="*[@diff='del']">
-  <xsl:choose>
-    <xsl:when test="$show.diff.markup != 0">
-      <xsl:call-template name="diff-markup">
-	<xsl:with-param name="diff">del</xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- suppress deleted markup -->
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template match="*[@diff='off']">
-  <xsl:choose>
-    <xsl:when test="$show.diff.markup != 0">
-      <xsl:call-template name="diff-markup">
-	<xsl:with-param name="diff">off</xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
 <!-- spec: the specification itself -->
 <xsl:template match="spec">
-  <html xmlns="http://www.w3.org/1999/xhtml">
+  <html>
     <xsl:if test="header/langusage/language">
-      <xsl:attribute name="xml:lang">
-	<xsl:value-of select="header/langusage/language/@id"/>
-      </xsl:attribute>
       <xsl:attribute name="lang">
 	<xsl:value-of select="header/langusage/language/@id"/>
       </xsl:attribute>
     </xsl:if>
     <head>
-      <xsl:if test="$output.mode='xhtml'">
-	<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
+      <xsl:if test="$output.mode='html'">
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
       </xsl:if>
       <title>
 	<xsl:apply-templates select="header/title"/>
@@ -212,11 +90,12 @@
 	</xsl:if>
       </title>
       <xsl:call-template name="css"/>
+      <xsl:call-template name="additional-head"/>
     </head>
     <body>
       <xsl:if test="/spec/@role='editors-copy'">
 	<xsl:value-of select="//revisiondesc/p[1]"/>
-	<div id="revisions"/>
+	<div id="revisions"></div>
       </xsl:if>
       <xsl:apply-templates/>
       <xsl:if test="//footnote[not(ancestor::table)]">
@@ -238,55 +117,56 @@
     </body>
   </html>
 </xsl:template>
-<!-- status: the status of the spec -->
-<xsl:template match="status">
-  <div xmlns="http://www.w3.org/1999/xhtml">
-    <h2>
-      <xsl:call-template name="anchor">
-	<xsl:with-param name="conditional" select="0"/>
-	<xsl:with-param name="default.id" select="'status'"/>
-      </xsl:call-template>
-      <xsl:text>Status of this Document</xsl:text>
-    </h2>
-    <xsl:if test="/spec/@role='editors-copy'">
-      <p><strong>This document is an editor's copy that has no official standing.</strong></p>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-<!-- specref: reference to another part of the current specification -->
+
+<!-- specref: reference to another part of teh current specification -->
 <xsl:template match="specref">
-  <xsl:variable name="target" select="key('ids', @ref)[1]"/>
+  <xsl:param name="target" select="key('ids', @ref)[1]"/>
+
   <xsl:choose>
-    <xsl:when test="local-name($target)='issue' or starts-with(local-name($target), 'div') or starts-with(local-name($target), 'inform-div') or local-name($target) = 'vcnote' or local-name($target) = 'prod' or local-name($target) = 'label' or local-name($target) = 'ritem' or local-name($target) = 'table'">
+    <xsl:when test="not($target)">
+      <xsl:message>
+        <xsl:text>specref to non-existent ID: </xsl:text>
+        <xsl:value-of select="@ref"/>
+      </xsl:message>
+    </xsl:when>
+    <xsl:when test="local-name($target)='issue'
+                    or starts-with(local-name($target), 'div')
+                    or starts-with(local-name($target), 'inform-div')
+                    or local-name($target) = 'vcnote'
+                    or local-name($target) = 'prod'
+                    or local-name($target) = 'example'
+                    or local-name($target) = 'label'
+                    or local-name($target) = 'table'
+                    or $target/self::item[parent::olist]">
       <xsl:apply-templates select="$target" mode="specref"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:message>
-	<xsl:text>Unsupported specref to </xsl:text>
-	<xsl:value-of select="local-name($target)"/>
-	<xsl:text> [</xsl:text>
-	<xsl:value-of select="@ref"/>
-	<xsl:text>] </xsl:text>
-	<xsl:text> (Contact stylesheet maintainer).</xsl:text>
+        <xsl:text>Unsupported specref to </xsl:text>
+        <xsl:value-of select="local-name($target)"/>
+        <xsl:text> [</xsl:text>
+        <xsl:value-of select="@ref"/>
+        <xsl:text>] </xsl:text>
+        <xsl:text> (Contact stylesheet maintainer).</xsl:text>
       </xsl:message>
-      <b xmlns="http://www.w3.org/1999/xhtml">
-	<a>
-	  <xsl:attribute name="href">
-	    <xsl:call-template name="href.target">
-	      <xsl:with-param name="target" select="key('ids', @ref)"/>
-	    </xsl:call-template>
-	  </xsl:attribute>
-	  <xsl:text>???</xsl:text>
-	</a>
+      <b>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="target" select="key('ids', @ref)"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:text>???</xsl:text>
+        </a>
       </b>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
+
 <!-- ednote: editors' note -->
 <xsl:template match="ednote">
   <xsl:if test="$show.ednotes != 0">
-    <table xmlns="http://www.w3.org/1999/xhtml" border="1" class="ednote" summary="Editor's Notes">
+    <table border="1" class="ednote" summary="Editor's Notes">
       <xsl:attribute name="summary">
 	<xsl:text>Editorial note</xsl:text>
 	<xsl:if test="name">
@@ -309,7 +189,7 @@
 	    <xsl:when test="date">
 	      <xsl:apply-templates select="date"/>
 	    </xsl:when>
-	    <xsl:otherwise> </xsl:otherwise>
+	    <xsl:otherwise>&#160;</xsl:otherwise>
 	  </xsl:choose>
 	</td>
       </tr>
@@ -321,11 +201,12 @@
     </table>
   </xsl:if>
 </xsl:template>
+
 <!-- glist: glossary list -->
 <xsl:template match="glist">
   <xsl:choose>
   <xsl:when test="@role = 'acronyms'">
-    <table xmlns="http://www.w3.org/1999/xhtml" class="acronyms" summary="Glossary List">
+    <table class="acronyms" summary="Glossary List">
       <xsl:for-each select="gitem">
         <tr>
           <xsl:apply-templates select="label" mode="acronym"/>
@@ -338,7 +219,7 @@
       <xsl:if test="$validity.hacks = 1 and local-name(..) = 'p'">
 	<xsl:text disable-output-escaping="yes">&lt;/p&gt;</xsl:text>
       </xsl:if>
-      <dl xmlns="http://www.w3.org/1999/xhtml">
+      <dl>
 	<xsl:if test="@role">
 	  <xsl:attribute name="class">
 	    <xsl:value-of select="@role"/>
@@ -352,9 +233,10 @@
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
+
 <!-- label: acronym mode -->
 <xsl:template mode="acronym" match="label">
-  <td xmlns="http://www.w3.org/1999/xhtml" class="label">
+  <td class="label">
     <xsl:call-template name="anchor">
       <xsl:with-param name="node" select=".."/>
     </xsl:call-template>
@@ -362,15 +244,29 @@
     <b><xsl:apply-templates/></b>
   </td>
 </xsl:template>
+
+<!-- code: generic computer code (override to map @role) -->
+<xsl:template match="code">
+  <code>
+    <xsl:if test="@role">
+      <xsl:attribute name="class">
+        <xsl:value-of select="@role"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </code>
+</xsl:template>
+
 <!-- def: acronym mode -->
 <xsl:template mode="acronym" match="def">
-  <td xmlns="http://www.w3.org/1999/xhtml" class="def">
+  <td class="def">
   <xsl:apply-templates/>
   </td>
 </xsl:template>
+
 <!-- loc: a Web location -->
 <xsl:template match="loc">
-  <a xmlns="http://www.w3.org/1999/xhtml" href="{@href}">
+  <a href="{@href}">
     <xsl:if test="@role">
       <xsl:attribute name="rel">
 	<xsl:value-of select="@role"/>
@@ -379,295 +275,25 @@
     <xsl:apply-templates/>
   </a>
 </xsl:template>
-<!-- rlist: requirement list -->
-<xsl:template match="rlist">
-  <dl xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates/>
-  </dl>
-</xsl:template>
-<!-- ritem: requirement item -->
-<xsl:template match="ritem">
-  <xsl:variable name="this-req-id">
-    <xsl:choose>
-      <xsl:when test="@id">
-	<xsl:value-of select="@id"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="generate-id(.)"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <dt xmlns="http://www.w3.org/1999/xhtml">
+
+<!-- note: a note about the spec (override to map @id) -->
+<xsl:template match="note">
+  <div class="note">
     <xsl:if test="@id">
-      <a name="{@id}" id="{@id}"/>
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
     </xsl:if>
-    <xsl:value-of select="$this-req-id"/>
-    <xsl:text disable-output-escaping="yes"> &#38;ndash; </xsl:text>
-    <xsl:apply-templates select="head" mode="text"/>
-  </dt>
-  <dd xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates select="req"/>
-  </dd>
-</xsl:template>
-<!-- ritem: requirement item; mode(diff) -->
-<xsl:template match="ritem" mode="diff">
-  <xsl:variable name="diffval" select="ancestor-or-self::*/@diff"/>
-  <xsl:variable name="this-req-id">
-    <xsl:choose>
-      <xsl:when test="@id">
-	<xsl:value-of select="@id"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="generate-id(.)"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$diffval='del' and $show.diff.markup = 0">
-      <!-- delete item -->
-    </xsl:when>
-    <xsl:otherwise>
-      <dt xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diffval}">
-	<xsl:if test="@id">
-	  <a name="{@id}" id="{@id}"/>
-	</xsl:if>
-	<xsl:value-of select="$this-req-id"/>
-	<xsl:text disable-output-escaping="yes"> &#38;ndash; </xsl:text>
-	<xsl:apply-templates select="head" mode="text"/>
-      </dt>
-      <dd xmlns="http://www.w3.org/1999/xhtml" class="diff-{$diffval}">
-	<xsl:apply-templates select="req"/>
-      </dd>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<xsl:template match="ritem" mode="specref">
-  <a xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="href">
-      <xsl:call-template name="href.target"/>
-    </xsl:attribute>
-    <b>
-      <xsl:apply-templates select="head" mode="text"/>
-    </b>
-  </a>
-</xsl:template>
-<!-- req: requirement body -->
-<xsl:template match="req">
-  <div xmlns="http://www.w3.org/1999/xhtml" class="req">
-    <xsl:apply-templates/>
-  </div>
-</xsl:template>
-<!-- uselist: use case scenario list -->
-<xsl:template match="uselist">
-  <dl xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates/>
-  </dl>
-</xsl:template>
-<!-- useitem: use case scenario item -->
-<xsl:template match="useitem">
-  <xsl:variable name="this-use-id">
-    <xsl:choose>
-      <xsl:when test="@id">
-	<xsl:value-of select="@id"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="generate-id(.)"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <dt xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:if test="@id">
-      <a name="{@id}" id="{@id}"/>
-    </xsl:if>
-    <xsl:value-of select="$this-use-id"/>
-    <xsl:text disable-output-escaping="yes"> &#38;ndash; </xsl:text>
-    <xsl:apply-templates select="head" mode="text"/>
-  </dt>
-  <dd xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates select="use"/>
-  </dd>
-</xsl:template>
-<xsl:template match="useitem" mode="specref">
-  <a xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:attribute name="href">
-      <xsl:call-template name="href.target"/>
-    </xsl:attribute>
-    <b>
-      <xsl:apply-templates select="head" mode="text"/>
-    </b>
-  </a>
-</xsl:template>
-<!-- use: use case scenario body -->
-<xsl:template match="use">
-  <div xmlns="http://www.w3.org/1999/xhtml" class="use">
+    <p class="prefix">
+      <b>Note:</b>
+    </p>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
-<!-- status w/diff -->
-<xsl:template match="status[@diff]" priority="1">
-  <xsl:variable name="diffval" select="ancestor-or-self::*/@diff"/>
-  <xsl:if test='$show.diff.markup != 0 or $diffval != "del"'>
-    <div xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:if test='$show.diff.markup != 0'>
-	<xsl:attribute name='class'>
-	  <xsl:text>diff-</xsl:text>
-	  <xsl:value-of select='$diffval'/>
-	</xsl:attribute>
-      </xsl:if>
-      <h2>
-	<xsl:call-template name="anchor">
-	  <xsl:with-param name="conditional" select="0"/>
-	  <xsl:with-param name="default.id" select="'status'"/>
-	</xsl:call-template>
-	<xsl:text>Status of this Document</xsl:text>
-      </h2>
-      <xsl:if test="/spec/@role='editors-copy'">
-	<p><strong>This document is an editor's copy that has no official standing.</strong></p>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </div>
-  </xsl:if>
-</xsl:template>
-<!-- note w/diff -->
-<xsl:template match="note[@diff]" priority="1">
-  <xsl:variable name="diffval" select="ancestor-or-self::*/@diff"/>
-  <xsl:if test='$show.diff.markup != 0 or $diffval != "del"'>
-    <div xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:if test='$show.diff.markup != 0'>
-	<xsl:attribute name='class'>
-	  <xsl:text>diff-</xsl:text>
-	  <xsl:value-of select='$diffval'/>
-	</xsl:attribute>
-      </xsl:if>
-      <div class="note">
-	<p class="prefix">
-	  <b>Note:</b>
-	</p>
-	<xsl:apply-templates/>
-      </div>
-    </div>
-  </xsl:if>
-</xsl:template>
-<!-- ulist w/diff -->
-<xsl:template match="ulist[@diff]" priority="1">
-  <xsl:variable name="diffval" select="ancestor-or-self::*/@diff"/>
-  <xsl:if test='$show.diff.markup != 0 or $diffval != "del"'>
-    <ul xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:if test='$show.diff.markup != 0'>
-	<xsl:attribute name='class'>
-	  <xsl:text>diff-</xsl:text>
-	  <xsl:value-of select='$diffval'/>
-	</xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </ul>
-  </xsl:if>
-</xsl:template>
-<!-- p w/diff -->
-<xsl:template match="p[@diff]" priority="1">
-  <xsl:variable name="diffval" select="ancestor-or-self::*/@diff"/>
-  <xsl:if test='$show.diff.markup != 0 or $diffval != "del"'>
-    <p xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:if test='$show.diff.markup != 0'>
-	<xsl:attribute name='class'>
-	  <xsl:text>diff-</xsl:text>
-	  <xsl:value-of select='$diffval'/>
-	</xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@id">
-	<xsl:attribute name="id">
-	  <xsl:value-of select="@id"/>
-	</xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@role">
-	<xsl:attribute name="class">
-	  <xsl:value-of select="@role"/>
-	</xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </p>
-  </xsl:if>
-</xsl:template>
-<!-- bibl w/diff -->
-<xsl:template match="bibl[@diff]" priority="1">
-  <xsl:variable name="diffval" select="ancestor-or-self::*/@diff"/>
-  <xsl:if test='$show.diff.markup != 0 or $diffval != "del"'>
-    <dt xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:attribute name='class'>
-	<xsl:text>label</xsl:text>
-	<xsl:if test='$show.diff.markup != 0'>
-	  <xsl:text>diff-</xsl:text>
-	  <xsl:value-of select='$diffval'/>
-	</xsl:if>
-      </xsl:attribute>
-      <xsl:if test="@id">
-	<a name="{@id}" id="{@id}"/>
-      </xsl:if>
-      <xsl:choose>
-	<xsl:when test="@key">
-	  <xsl:value-of select="@key"/>
-	</xsl:when>
-	<xsl:otherwise>
-	  <xsl:value-of select="@id"/>
-	</xsl:otherwise>
-      </xsl:choose>
-    </dt>
-    <dd xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:if test='$show.diff.markup != 0'>
-	<xsl:attribute name='class'>
-	  <xsl:text>diff-</xsl:text>
-	  <xsl:value-of select='$diffval'/>
-	</xsl:attribute>
-      </xsl:if>
-      <xsl:choose>
-	<xsl:when test="@href">
-	  <a href="{@href}">
-	    <xsl:apply-templates/>
-	  </a>
-	</xsl:when>
-	<xsl:otherwise>
-	  <xsl:apply-templates/>
-	</xsl:otherwise>
-      </xsl:choose>
-      <xsl:if test="@href">
-	<xsl:text>  (See </xsl:text>
-	<xsl:value-of select="@href"/>
-	<xsl:text>.)</xsl:text>
-      </xsl:if>
-    </dd>
-  </xsl:if>
-</xsl:template>
-<!-- table -->
-<xsl:template match="table">
-  <table xmlns="http://www.w3.org/1999/xhtml" summary="HTML Table">
-    <xsl:for-each select="@*">
-      <xsl:choose>
-	<xsl:when test="local-name(.) = 'diff'"/>
-	<xsl:when test="local-name(.) = 'role'">
-	  <xsl:attribute name="class">
-	    <xsl:value-of select="."/>
-	  </xsl:attribute>
-	</xsl:when>
-	<xsl:otherwise>
-	  <xsl:copy-of select="."/>
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-    <xsl:apply-templates/>
-    <xsl:if test=".//footnote">
-      <tbody>
-	<tr>
-	  <td>
-	    <xsl:apply-templates select=".//footnote" mode="table.notes"/>
-	  </td>
-	</tr>
-      </tbody>
-    </xsl:if>
-  </table>
-</xsl:template>
+
 <!-- table specref -->
 <xsl:template match="table" mode="specref">
-  <a xmlns="http://www.w3.org/1999/xhtml">
+  <a>
     <xsl:attribute name="href">
       <xsl:call-template name="href.target"/>
     </xsl:attribute>
@@ -676,14 +302,10 @@
     </b>
   </a>
 </xsl:template>
-<!-- br: explicit line break -->
-<xsl:template match="br">
-  <br xmlns="http://www.w3.org/1999/xhtml" />
-</xsl:template>
 
 <!-- authlist -->
 <xsl:template match="authlist">
-  <dt xmlns="http://www.w3.org/1999/xhtml">
+  <dt>
     <xsl:choose>
       <xsl:when test="@role='editor'">
 	<xsl:text>Editor</xsl:text>
@@ -702,4 +324,5 @@
   </dt>
   <xsl:apply-templates/>
 </xsl:template>
+
 </xsl:stylesheet>
--- a/ttml10/spec/xmlspec.xsl	Thu May 09 10:06:24 2013 -0600
+++ b/ttml10/spec/xmlspec.xsl	Thu May 09 13:03:57 2013 -0600
@@ -1,7 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets. Do not edit this file.-->
-<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" exclude-result-prefixes="saxon" version="1.0">
+<?xml version="1.0"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:saxon="http://icl.com/saxon"
+               exclude-result-prefixes="saxon"
+               version="1.0">
 
 <!-- ====================================================================== -->
 <!-- xmlspec.xsl: An HTML XSL[1] Stylesheet for XML Spec V2.1[2] markup
@@ -128,7 +129,17 @@
 
   <xsl:preserve-space elements="*"/>
 
-  <xsl:strip-space elements="    abstract arg attribute authlist author back bibref blist body case col    colgroup component constant constraint constraintnote copyright def    definitions descr div div1 div2 div3 div4 div5 ednote enum enumerator    example exception footnote front gitem glist graphic group header    htable htbody inform-div1 interface issue item itemizedlist langusage    listitem member method module note notice ol olist orderedlist orglist    param parameters prod prodgroup prodrecap proto pubdate pubstmt raises    reference resolution returns revisiondesc scrap sequence slist    sourcedesc spec specref status struct table tbody tfoot thead tr    typedef ul ulist union vc vcnote wfc wfcnote"/>
+  <xsl:strip-space elements="
+   abstract arg attribute authlist author back bibref blist body case col
+   colgroup component constant constraint constraintnote copyright def
+   definitions descr div div1 div2 div3 div4 div5 ednote enum enumerator
+   example exception footnote front gitem glist graphic group header
+   htable htbody inform-div1 interface issue item itemizedlist langusage
+   listitem member method module note notice ol olist orderedlist orglist
+   param parameters prod prodgroup prodrecap proto pubdate pubstmt raises
+   reference resolution returns revisiondesc scrap sequence slist
+   sourcedesc spec specref status struct table tbody tfoot thead tr
+   typedef ul ulist union vc vcnote wfc wfcnote"/>
 
   <xsl:param name="validity.hacks" select="1"/>
   <xsl:param name="show.diff.markup" select="0"/>
@@ -142,7 +153,10 @@
   <xsl:key name="ids" match="*[@id]" use="@id"/>
   <xsl:key name="specrefs" match="specref" use="@ref"/>
 
-  <xsl:output method="xml" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="no" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+  <xsl:output method="html"
+       encoding="utf-8"
+       doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+       indent="no"/>
 
   <!-- not handled:
     attribute:   unhandled IDL stuff
@@ -182,7 +196,7 @@
       <xsl:text>.</xsl:text>
     </xsl:message>
 
-    <font xmlns="http://www.w3.org/1999/xhtml" color="red">
+    <font color="red">
       <xsl:text>&lt;</xsl:text>
       <xsl:value-of select="name(.)"/>
       <xsl:text>&gt;</xsl:text>
@@ -209,9 +223,8 @@
   <!-- format as a second-level div -->
   <!-- called in enforced order from header's template -->
   <xsl:template match="abstract">
-    <div xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:text>
-</xsl:text>
+    <div>
+      <xsl:text>&#10;</xsl:text>
       <h2>
         <xsl:call-template name="anchor">
           <xsl:with-param name="conditional" select="0"/>
@@ -238,7 +251,7 @@
     <xsl:if test="preceding-sibling::arg">
       <xsl:text>, </xsl:text>
     </xsl:if>
-    <var xmlns="http://www.w3.org/1999/xhtml">
+    <var>
       <xsl:value-of select="@type"/>
     </var>
     <xsl:if test="@occur = 'opt'">
@@ -250,7 +263,7 @@
   <!-- used lots of places -->
   <!-- format as monospaced code -->
   <xsl:template match="att">
-    <code xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></code>
+    <code><xsl:apply-templates/></code>
   </xsl:template>
 
   <!-- attribute: -->
@@ -269,9 +282,9 @@
   <!-- called in enforced order from header's template, in <dl>
        context -->
   <xsl:template match="authlist">
-    <dt xmlns="http://www.w3.org/1999/xhtml">
+    <dt>
       <xsl:text>Editor</xsl:text>
-      <xsl:if test="count(author) &gt; 1">
+      <xsl:if test="count(author) > 1">
         <xsl:text>s</xsl:text>
       </xsl:if>
       <xsl:text>:</xsl:text>
@@ -283,7 +296,7 @@
   <!-- only appears in authlist -->
   <!-- called in <dl> context -->
   <xsl:template match="author">
-    <dd xmlns="http://www.w3.org/1999/xhtml">
+    <dd>
       <xsl:apply-templates/>
       <xsl:if test="@role = '2e'">
         <xsl:text> - Second Edition</xsl:text>
@@ -295,7 +308,7 @@
   <!-- make a <div> for neatness -->
   <!-- affects numbering of div1 children -->
   <xsl:template match="back">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="back">
+    <div class="back">
       <xsl:apply-templates/>
       <xsl:call-template name="autogenerated-appendices"/>
     </div>
@@ -307,7 +320,7 @@
   <!-- if there's a key, use it in the <dt>, otherwise use the ID -->
   <!-- if there's an href, add a ref in parens at the end of the text -->
   <xsl:template match="bibl">
-    <dt xmlns="http://www.w3.org/1999/xhtml" class="label">
+    <dt class="label">
       <xsl:if test="@id">
         <a name="{@id}" id="{@id}"/>
       </xsl:if>
@@ -320,7 +333,7 @@
         </xsl:otherwise>
       </xsl:choose>
     </dt>
-    <dd xmlns="http://www.w3.org/1999/xhtml">
+    <dd>
       <xsl:apply-templates/>
       <xsl:if test="@href">
         <xsl:text>  (See </xsl:text>
@@ -335,7 +348,7 @@
   <!-- if the bibl has a key, put it in square brackets; otherwise use
        the bibl's ID -->
   <xsl:template match="bibref">
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="key('ids', @ref)"/>
@@ -357,7 +370,7 @@
   <!-- blist: list of bibliographic entries -->
   <!-- set up the list and process children -->
   <xsl:template match="blist">
-    <dl xmlns="http://www.w3.org/1999/xhtml">
+    <dl>
       <xsl:apply-templates/>
     </dl>
   </xsl:template>
@@ -366,7 +379,7 @@
   <!-- preformatted within a table cell -->
   <!-- scrap provides <table> context -->
   <xsl:template match="bnf">
-    <tbody xmlns="http://www.w3.org/1999/xhtml">
+    <tbody>
       <tr>
         <td>
           <xsl:if test="@diff and $show.diff.markup != 0">
@@ -389,9 +402,8 @@
        notes) -->
   <xsl:template match="body">
     <xsl:if test="$toc.level &gt; 0">
-      <div xmlns="http://www.w3.org/1999/xhtml" class="toc">
-        <xsl:text>
-</xsl:text>
+      <div class="toc">
+        <xsl:text>&#10;</xsl:text>
         <h2>
           <xsl:call-template name="anchor">
             <xsl:with-param name="conditional" select="0"/>
@@ -403,8 +415,7 @@
           <xsl:apply-templates select="div1" mode="toc"/>
         </p>
         <xsl:if test="../back">
-          <xsl:text>
-</xsl:text>
+          <xsl:text>&#10;</xsl:text>
           <h3>
             <xsl:call-template name="anchor">
               <xsl:with-param name="conditional" select="0"/>
@@ -413,7 +424,7 @@
 
             <xsl:text>Appendi</xsl:text>
             <xsl:choose>
-              <xsl:when test="count(../back/div1 | ../back/inform-div1) &gt; 1">
+              <xsl:when test="count(../back/div1 | ../back/inform-div1) > 1">
                 <xsl:text>ces</xsl:text>
               </xsl:when>
               <xsl:otherwise>
@@ -422,7 +433,8 @@
             </xsl:choose>
           </h3>
           <p class="toc">
-            <xsl:apply-templates mode="toc" select="../back/div1 | ../back/inform-div1"/>
+            <xsl:apply-templates mode="toc"
+                                 select="../back/div1 | ../back/inform-div1"/>
             <xsl:call-template name="autogenerated-appendices-toc"/>
           </p>
         </xsl:if>
@@ -434,9 +446,9 @@
           </p>
         </xsl:if>
       </div>
-      <hr xmlns="http://www.w3.org/1999/xhtml"/>
+      <hr/>
     </xsl:if>
-    <div xmlns="http://www.w3.org/1999/xhtml" class="body">
+    <div class="body">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -457,7 +469,7 @@
   <!-- code: generic computer code -->
   <!-- output as HTML <code> for monospaced formatting -->
   <xsl:template match="code">
-    <code xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></code>
+    <code><xsl:apply-templates/></code>
   </xsl:template>
 
   <!-- col: see table -->
@@ -469,7 +481,7 @@
   <xsl:template match="com">
     <xsl:choose>
       <xsl:when test="preceding-sibling::*[1][name()='rhs']">
-        <td xmlns="http://www.w3.org/1999/xhtml">
+        <td>
           <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
             <xsl:attribute name="class">
               <xsl:text>diff-</xsl:text>
@@ -484,7 +496,7 @@
         </td>
       </xsl:when>
       <xsl:otherwise>
-        <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+        <tr valign="baseline">
           <td/><td/><td/><td/>
           <td>
             <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
@@ -508,7 +520,7 @@
        have arbitrary text and com mixed in, I don't feel like
        spending enough time to figure out how -->
   <xsl:template match="rhs/com">
-    <i xmlns="http://www.w3.org/1999/xhtml">
+    <i>
       <xsl:text>/* </xsl:text>
       <xsl:apply-templates/>
       <xsl:text> */</xsl:text>
@@ -526,7 +538,7 @@
   <xsl:template match="constraint">
     <xsl:choose>
       <xsl:when test="preceding-sibling::*[1][name()='rhs']">
-        <td xmlns="http://www.w3.org/1999/xhtml">
+        <td>
           <xsl:if test="@diff and $show.diff.markup != 0">
             <xsl:attribute name="class">
               <xsl:text>diff-</xsl:text>
@@ -546,7 +558,7 @@
         </td>
       </xsl:when>
       <xsl:otherwise>
-        <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+        <tr valign="baseline">
           <td/><td/><td/><td/>
           <td>
             <xsl:if test="@diff and $show.diff.markup != 0">
@@ -574,7 +586,7 @@
   <!-- constraintnote: note constraining a formal production -->
   <!-- see also constraintnote/head -->
   <xsl:template match="constraintnote">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="constraint">
+    <div class="constraint">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -592,7 +604,7 @@
   <!-- def: glossary definition -->
   <!-- already in <dl> context from glist -->
   <xsl:template match="def">
-    <dd xmlns="http://www.w3.org/1999/xhtml">
+    <dd>
       <xsl:apply-templates/>
     </dd>
   </xsl:template>
@@ -607,31 +619,31 @@
   <!-- make an HTML div -->
   <!-- see also div[n]/head -->
   <xsl:template match="div1">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="div1">
+    <div class="div1">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
 
   <xsl:template match="div2">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="div2">
+    <div class="div2">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
 
   <xsl:template match="div3">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="div3">
+    <div class="div3">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
 
   <xsl:template match="div4">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="div4">
+    <div class="div4">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
 
   <xsl:template match="div5">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="div5">
+    <div class="div5">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -639,7 +651,7 @@
   <!-- ednote: editors' note -->
   <xsl:template match="ednote">
     <xsl:if test="$show.ednotes != 0">
-      <table xmlns="http://www.w3.org/1999/xhtml" border="1">
+      <table border="1">
         <xsl:attribute name="summary">
           <xsl:text>Editorial note</xsl:text>
           <xsl:if test="name">
@@ -662,7 +674,7 @@
               <xsl:when test="date">
                 <xsl:apply-templates select="date"/>
               </xsl:when>
-              <xsl:otherwise> </xsl:otherwise>
+              <xsl:otherwise>&#160;</xsl:otherwise>
             </xsl:choose>
           </td>
         </tr>
@@ -691,14 +703,14 @@
   <!-- Chris's personal preference is to put pointy-brackets around
        this, but he seems to be in the minority -->
   <xsl:template match="el">
-    <code xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></code>
+    <code><xsl:apply-templates/></code>
   </xsl:template>
 
   <!-- email: an email address for an editor -->
   <!-- only occurs in author -->
   <xsl:template match="email">
     <xsl:text> </xsl:text>
-    <a xmlns="http://www.w3.org/1999/xhtml" href="{@href}">
+    <a href="{@href}">
       <xsl:text>&lt;</xsl:text>
       <xsl:apply-templates/>
       <xsl:text>&gt;</xsl:text>
@@ -710,12 +722,12 @@
   <!-- the role attribute could be used for multiple kinds of
        emphasis, but that would not be kind -->
   <xsl:template match="emph">
-    <em xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></em>
+    <em><xsl:apply-templates/></em>
   </xsl:template>
 
   <!-- rfc2119: identifies RFC 2119 keywords -->
   <xsl:template match="rfc2119">
-    <strong xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></strong>
+    <strong><xsl:apply-templates/></strong>
   </xsl:template>
 
   <!-- enum: -->
@@ -734,17 +746,16 @@
         <xsl:otherwise>example</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-    <div xmlns="http://www.w3.org/1999/xhtml" class="{$class}">
+    <div class="{$class}">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
 
   <xsl:template match="example/head">
-    <xsl:text>
-</xsl:text>
+    <xsl:text>&#10;</xsl:text>
     <xsl:choose>
       <xsl:when test="$tabular.examples = 0">
-        <div xmlns="http://www.w3.org/1999/xhtml" class="exampleHeader">
+        <div class="exampleHeader">
           <xsl:call-template name="anchor">
             <xsl:with-param name="node" select=".."/>
             <xsl:with-param name="conditional" select="0"/>
@@ -754,7 +765,7 @@
         </div>
       </xsl:when>
       <xsl:otherwise>
-        <h5 xmlns="http://www.w3.org/1999/xhtml">
+        <h5>
           <xsl:call-template name="anchor">
             <xsl:with-param name="node" select=".."/>
             <xsl:with-param name="conditional" select="0"/>
@@ -772,7 +783,7 @@
   <xsl:template match="eg">
     <xsl:variable name="content">
       <xsl:call-template name="anchor"/>
-      <pre xmlns="http://www.w3.org/1999/xhtml">
+      <pre>
         <xsl:if test="@diff and $show.diff.markup != 0">
           <xsl:attribute name="class">
             <xsl:text>diff-</xsl:text>
@@ -784,12 +795,14 @@
     </xsl:variable>
     <xsl:choose>
       <xsl:when test="$tabular.examples = 0">
-        <div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner">
+        <div class="exampleInner">
           <xsl:copy-of select="$content"/>
         </div>
       </xsl:when>
       <xsl:otherwise>
-        <table xmlns="http://www.w3.org/1999/xhtml" class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example">
+        <table class="eg" cellpadding="5" border="1"
+               bgcolor="#99ffff" width="100%"
+               summary="Example">
           <tr>
             <td>
               <xsl:copy-of select="$content"/>
@@ -815,9 +828,10 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-    <sup xmlns="http://www.w3.org/1999/xhtml">
+    <sup>
       <xsl:text>[</xsl:text>
-      <a name="FN-ANCH-{$this-note-id}" id="FN-ANCH-{$this-note-id}" href="#{$this-note-id}">
+      <a name="FN-ANCH-{$this-note-id}" id="FN-ANCH-{$this-note-id}"
+         href="#{$this-note-id}">
         <xsl:apply-templates select="." mode="number-simple"/>
       </a>
       <xsl:text>]</xsl:text>
@@ -827,7 +841,7 @@
   <!-- front: front matter for the spec -->
   <!-- make a div for cleanliness -->
   <xsl:template match="front">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="front">
+    <div class="front">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -835,7 +849,7 @@
   <!-- function: name of a function -->
   <!-- format as HTML <code> for monospaced presentation -->
   <xsl:template match="function">
-    <code xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></code>
+    <code><xsl:apply-templates/></code>
   </xsl:template>
 
   <!-- gitem: glossary list entry -->
@@ -850,7 +864,7 @@
     <xsl:if test="$validity.hacks = 1 and local-name(..) = 'p'">
       <xsl:text disable-output-escaping="yes">&lt;/p&gt;</xsl:text>
     </xsl:if>
-    <dl xmlns="http://www.w3.org/1999/xhtml">
+    <dl>
       <xsl:apply-templates/>
     </dl>
     <xsl:if test="$validity.hacks = 1 and local-name(..) = 'p'">
@@ -861,7 +875,7 @@
   <!-- graphic: external illustration -->
   <!-- reference external graphic file with alt text -->
   <xsl:template match="graphic">
-    <img xmlns="http://www.w3.org/1999/xhtml" src="{@source}">
+    <img src="{@source}">
       <xsl:if test="@alt">
         <xsl:attribute name="alt">
           <xsl:value-of select="@alt"/>
@@ -878,7 +892,7 @@
   <!-- constraintnotes have different types, but they're
        non-enumerated; nothing is done with them right now -->
   <xsl:template match="constraintnote/head">
-    <p xmlns="http://www.w3.org/1999/xhtml" class="prefix">
+    <p class="prefix">
       <xsl:if test="../@id">
         <a name="{../@id}" id="{../@id}"/>
       </xsl:if>
@@ -887,9 +901,8 @@
   </xsl:template>
 
   <xsl:template match="div1/head">
-    <xsl:text>
-</xsl:text>
-    <h2 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h2>
       <xsl:call-template name="anchor">
         <xsl:with-param name="conditional" select="0"/>
         <xsl:with-param name="node" select=".."/>
@@ -900,9 +913,8 @@
   </xsl:template>
 
   <xsl:template match="div2/head">
-    <xsl:text>
-</xsl:text>
-    <h3 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h3>
       <xsl:call-template name="anchor">
         <xsl:with-param name="conditional" select="0"/>
         <xsl:with-param name="node" select=".."/>
@@ -913,9 +925,8 @@
   </xsl:template>
 
   <xsl:template match="div3/head">
-    <xsl:text>
-</xsl:text>
-    <h4 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h4>
       <xsl:call-template name="anchor">
         <xsl:with-param name="conditional" select="0"/>
         <xsl:with-param name="node" select=".."/>
@@ -926,9 +937,8 @@
   </xsl:template>
 
   <xsl:template match="div4/head">
-    <xsl:text>
-</xsl:text>
-    <h5 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h5>
       <xsl:call-template name="anchor">
         <xsl:with-param name="conditional" select="0"/>
         <xsl:with-param name="node" select=".."/>
@@ -939,9 +949,8 @@
   </xsl:template>
 
   <xsl:template match="div5/head">
-    <xsl:text>
-</xsl:text>
-    <h6 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h6>
       <xsl:call-template name="anchor">
         <xsl:with-param name="conditional" select="0"/>
         <xsl:with-param name="node" select=".."/>
@@ -952,9 +961,8 @@
   </xsl:template>
 
   <xsl:template match="inform-div1/head">
-    <xsl:text>
-</xsl:text>
-    <h2 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h2>
       <xsl:call-template name="anchor">
         <xsl:with-param name="conditional" select="0"/>
         <xsl:with-param name="node" select=".."/>
@@ -966,15 +974,14 @@
   </xsl:template>
 
   <xsl:template match="issue/head">
-    <p xmlns="http://www.w3.org/1999/xhtml" class="prefix">
+    <p class="prefix">
       <b><xsl:apply-templates/></b>
     </p>
   </xsl:template>
 
   <xsl:template match="scrap/head">
-    <xsl:text>
-</xsl:text>
-    <h5 xmlns="http://www.w3.org/1999/xhtml">
+    <xsl:text>&#10;</xsl:text>
+    <h5>
       <xsl:call-template name="anchor">
         <xsl:with-param name="node" select=".."/>
         <xsl:with-param name="conditional" select="0"/>
@@ -985,7 +992,7 @@
   </xsl:template>
 
   <xsl:template match="vcnote/head">
-    <p xmlns="http://www.w3.org/1999/xhtml" class="prefix">
+    <p class="prefix">
       <xsl:if test="../@id">
         <a name="{../@id}" id="{../@id}"/>
       </xsl:if>
@@ -994,7 +1001,7 @@
   </xsl:template>
 
   <xsl:template match="wfcnote/head">
-    <p xmlns="http://www.w3.org/1999/xhtml" class="prefix">
+    <p class="prefix">
       <xsl:if test="../@id">
         <a name="{../@id}" id="{../@id}"/>
       </xsl:if>
@@ -1005,28 +1012,30 @@
   <!-- header: metadata about the spec -->
   <!-- pull out information into standard W3C layout -->
   <xsl:template match="header">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="head">
+    <div class="head">
       <xsl:if test="not(/spec/@role='editors-copy')">
         <p>
           <a href="http://www.w3.org/">
-            <img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"/>
+            <img src="http://www.w3.org/Icons/w3c_home"
+              alt="W3C" height="48" width="72"/>
           </a>
 	  <xsl:choose>
 	    <xsl:when test="/spec/@w3c-doctype='memsub'">
-	      <a href="http://www.w3.org/Submission/">
-		<img alt="Member Submission" src="http://www.w3.org/Icons/member_subm"/>
+	      <a href='http://www.w3.org/Submission/'>
+		<img alt='Member Submission'
+		     src='http://www.w3.org/Icons/member_subm'/>
 	      </a>
 	    </xsl:when>
 	    <xsl:when test="/spec/@w3c-doctype='teamsub'">
-	      <a href="http://www.w3.org/2003/06/TeamSubmission">
-		<img alt="Team Submission" src="http://www.w3.org/Icons/team_subm"/>
+	      <a href='http://www.w3.org/2003/06/TeamSubmission'>
+		<img alt='Team Submission'
+		     src='http://www.w3.org/Icons/team_subm'/>
 	      </a>
 	    </xsl:when>
 	  </xsl:choose>
         </p>
       </xsl:if>
-      <xsl:text>
-</xsl:text>
+      <xsl:text>&#10;</xsl:text>
       <h1>
         <xsl:call-template name="anchor">
           <xsl:with-param name="node" select="title[1]"/>
@@ -1041,8 +1050,7 @@
         </xsl:if>
       </h1>
       <xsl:if test="subtitle">
-        <xsl:text>
-</xsl:text>
+        <xsl:text>&#10;</xsl:text>
         <h2>
           <xsl:call-template name="anchor">
             <xsl:with-param name="node" select="subtitle[1]"/>
@@ -1052,8 +1060,7 @@
           <xsl:apply-templates select="subtitle"/>
         </h2>
       </xsl:if>
-      <xsl:text>
-</xsl:text>
+      <xsl:text>&#10;</xsl:text>
       <h2>
 	<xsl:call-template name="anchor">
 	  <xsl:with-param name="node" select="w3c-doctype[1]"/>
@@ -1100,13 +1107,13 @@
             <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
               <xsl:text>Copyright</xsl:text>
             </a>
-            <xsl:text> © </xsl:text>
+            <xsl:text>&#xa0;&#xa9;&#xa0;</xsl:text>
             <xsl:apply-templates select="pubdate/year"/>
-            <xsl:text> </xsl:text>
+            <xsl:text>&#xa0;</xsl:text>
             <a href="http://www.w3.org/">
               <acronym title="World Wide Web Consortium">W3C</acronym>
             </a>
-            <sup>®</sup>
+            <sup>&#xae;</sup>
             <xsl:text> (</xsl:text>
             <a href="http://www.csail.mit.edu/">
               <acronym title="Massachusetts Institute of Technology">MIT</acronym>
@@ -1130,7 +1137,7 @@
         </xsl:otherwise>
       </xsl:choose>
     </div>
-    <hr xmlns="http://www.w3.org/1999/xhtml"/>
+    <hr/>
     <xsl:apply-templates select="notice"/>
     <xsl:apply-templates select="abstract"/>
     <xsl:apply-templates select="status"/>
@@ -1146,7 +1153,7 @@
   </xsl:template>
 
   <xsl:template match="copyright/p">
-    <p xmlns="http://www.w3.org/1999/xhtml" class="copyright">
+    <p class="copyright">
       <xsl:apply-templates/>
     </p>
   </xsl:template>
@@ -1154,7 +1161,7 @@
   <!-- inform-div1: non-normative back matter top-level division -->
   <!-- treat like div1 except add "(Non-Normative)" to title -->
   <xsl:template match="inform-div1">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="div1">
+    <div class="div1">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -1168,7 +1175,7 @@
        element; this should probably be cleaned up to only use the
        head if it's present -->
   <xsl:template match="issue">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="issue">
+    <div class="issue">
       <p class="prefix">
         <xsl:if test="@id">
           <a name="{@id}" id="{@id}"/>
@@ -1194,7 +1201,7 @@
 
   <!-- item: generic list item -->
   <xsl:template match="item">
-    <li xmlns="http://www.w3.org/1999/xhtml">
+    <li>
       <xsl:if test="@id">
 	<xsl:attribute name="id">
 	  <xsl:value-of select="@id"/>
@@ -1207,13 +1214,13 @@
   <!-- kw: keyword -->
   <!-- make it bold -->
   <xsl:template match="kw">
-    <b xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></b>
+    <b><xsl:apply-templates/></b>
   </xsl:template>
 
   <!-- label: term for defintion in glossary entry -->
   <!-- already in <dl> context from glist -->
   <xsl:template match="label">
-    <dt xmlns="http://www.w3.org/1999/xhtml" class="label">
+    <dt class="label">
       <xsl:call-template name="anchor">
         <xsl:with-param name="node" select=".."/>
       </xsl:call-template>
@@ -1237,10 +1244,10 @@
     <xsl:choose>
       <xsl:when test="count(loc) &gt; 1">
 	<xsl:for-each select="loc">
-	  <dt xmlns="http://www.w3.org/1999/xhtml">
+	  <dt>
 	    <xsl:apply-templates select="node()"/>
 	  </dt>
-	  <dd xmlns="http://www.w3.org/1999/xhtml">
+	  <dd>
 	    <a href="{@href}">
 	      <xsl:value-of select="@href"/>
 	    </a>
@@ -1248,8 +1255,8 @@
 	</xsl:for-each>
       </xsl:when>
       <xsl:otherwise>
-	<dt xmlns="http://www.w3.org/1999/xhtml">Latest version:</dt>
-	<dd xmlns="http://www.w3.org/1999/xhtml">
+	<dt>Latest version:</dt>
+	<dd>
 	  <xsl:apply-templates/>
 	</dd>
       </xsl:otherwise>
@@ -1260,7 +1267,7 @@
   <!-- make a table row with the lhs and the corresponding other
        pieces in this crazy mixed-up content model -->
   <xsl:template match="lhs">
-    <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+    <tr valign="baseline">
       <td>
         <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
           <xsl:attribute name="class">
@@ -1278,7 +1285,7 @@
           <xsl:number count="prod" level="any" from="spec"
             format="[1]"/>
   -->
-        <xsl:text>   </xsl:text>
+        <xsl:text>&#xa0;&#xa0;&#xa0;</xsl:text>
       </td>
       <td>
         <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
@@ -1296,9 +1303,10 @@
             <xsl:value-of select="ancestor-or-self::*/@diff"/>
           </xsl:attribute>
         </xsl:if>
-        <xsl:text>   ::=   </xsl:text>
+        <xsl:text>&#xa0;&#xa0;&#xa0;::=&#xa0;&#xa0;&#xa0;</xsl:text>
       </td>
-      <xsl:apply-templates select="following-sibling::*[1][name()='rhs']"/>
+      <xsl:apply-templates
+        select="following-sibling::*[1][name()='rhs']"/>
     </tr>
   </xsl:template>
 
@@ -1315,7 +1323,7 @@
       </xsl:if>
     </xsl:if>
 
-    <a xmlns="http://www.w3.org/1999/xhtml" href="{@href}">
+    <a href="{@href}">
       <xsl:choose>
         <xsl:when test="count(child::node())=0">
           <xsl:value-of select="@href"/>
@@ -1330,7 +1338,7 @@
   <!-- member: member of an organization -->
   <!-- appears only in orglist, which creates <ul> context -->
   <xsl:template match="member">
-    <li xmlns="http://www.w3.org/1999/xhtml">
+    <li>
       <xsl:apply-templates/>
     </li>
   </xsl:template>
@@ -1356,7 +1364,7 @@
 
   <!-- note: a note about the spec -->
   <xsl:template match="note">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="note">
+    <div class="note">
       <p class="prefix">
         <b>Note:</b>
       </p>
@@ -1367,7 +1375,7 @@
   <!-- notice: a front-matter advisory about the spec's status -->
   <!-- make sure people notice it -->
   <xsl:template match="notice">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="notice">
+    <div class="notice">
       <p class="prefix">
         <b>NOTICE:</b>
       </p>
@@ -1378,7 +1386,7 @@
   <!-- nt: production non-terminal -->
   <!-- make a link to the non-terminal's definition -->
   <xsl:template match="nt">
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="key('ids', @def)"/>
@@ -1408,21 +1416,21 @@
       <xsl:call-template name="list.numeration"/>
     </xsl:variable>
 
-    <ol xmlns="http://www.w3.org/1999/xhtml" class="enum{$numeration}">
+    <ol class="enum{$numeration}">
       <xsl:apply-templates/>
     </ol>
   </xsl:template>
 
   <!-- orglist: a list of an organization's members -->
   <xsl:template match="orglist">
-    <ul xmlns="http://www.w3.org/1999/xhtml">
+    <ul>
       <xsl:apply-templates/>
     </ul>
   </xsl:template>
 
   <!-- p: a standard paragraph -->
   <xsl:template match="p">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <xsl:if test="@id">
         <xsl:attribute name="id">
           <xsl:value-of select="@id"/>
@@ -1447,7 +1455,7 @@
   <!-- role attributes may be used to request different formatting,
        which isn't currently handled -->
   <xsl:template match="phrase">
-    <span xmlns="http://www.w3.org/1999/xhtml">
+    <span>
       <xsl:if test="@role">
         <xsl:attribute name="class">
           <xsl:value-of select="@role"/>
@@ -1460,12 +1468,12 @@
   <!-- prevlocs: previous locations for this spec -->
   <!-- called in a <dl> context from header -->
   <xsl:template match="prevlocs">
-    <dt xmlns="http://www.w3.org/1999/xhtml">
+    <dt>
       <xsl:text>Previous version</xsl:text>
       <xsl:if test="count(loc) &gt; 1">s</xsl:if>
       <xsl:text>:</xsl:text>
     </dt>
-    <dd xmlns="http://www.w3.org/1999/xhtml">
+    <dd>
       <xsl:apply-templates/>
     </dd>
   </xsl:template>
@@ -1477,19 +1485,31 @@
   <!-- process the first child in each row, and it will process the
        others -->
   <xsl:template match="prod">
-    <tbody xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:apply-templates select="lhs |                 rhs[preceding-sibling::*[1][name()!='lhs']] |                 com[preceding-sibling::*[1][name()!='rhs']] |                 constraint[preceding-sibling::*[1][name()!='rhs']] |                 vc[preceding-sibling::*[1][name()!='rhs']] |                 wfc[preceding-sibling::*[1][name()!='rhs']]"/>
+    <tbody>
+      <xsl:apply-templates
+        select="lhs |
+                rhs[preceding-sibling::*[1][name()!='lhs']] |
+                com[preceding-sibling::*[1][name()!='rhs']] |
+                constraint[preceding-sibling::*[1][name()!='rhs']] |
+                vc[preceding-sibling::*[1][name()!='rhs']] |
+                wfc[preceding-sibling::*[1][name()!='rhs']]"/>
     </tbody>
   </xsl:template>
 
   <xsl:template match="prodgroup/prod">
-    <xsl:apply-templates select="lhs |               rhs[preceding-sibling::*[1][name()!='lhs']] |               com[preceding-sibling::*[1][name()!='rhs']] |               constraint[preceding-sibling::*[1][name()!='rhs']] |               vc[preceding-sibling::*[1][name()!='rhs']] |               wfc[preceding-sibling::*[1][name()!='rhs']]"/>
+    <xsl:apply-templates
+      select="lhs |
+              rhs[preceding-sibling::*[1][name()!='lhs']] |
+              com[preceding-sibling::*[1][name()!='rhs']] |
+              constraint[preceding-sibling::*[1][name()!='rhs']] |
+              vc[preceding-sibling::*[1][name()!='rhs']] |
+              wfc[preceding-sibling::*[1][name()!='rhs']]"/>
   </xsl:template>
 
   <!-- prodgroup: group of formal productions -->
   <!-- create one <tbody> for each group -->
   <xsl:template match="prodgroup">
-    <tbody xmlns="http://www.w3.org/1999/xhtml">
+    <tbody>
       <xsl:apply-templates/>
     </tbody>
   </xsl:template>
@@ -1499,14 +1519,14 @@
        <tbody> or a number, plus links the lhs to the original
        production -->
   <xsl:template match="prodrecap">
-    <tbody xmlns="http://www.w3.org/1999/xhtml">
+    <tbody>
       <xsl:apply-templates select="key('ids', @ref)" mode="ref"/>
     </tbody>
   </xsl:template>
 
   <xsl:template match="processing-instruction('specprod')">
     <xsl:if test="contains(., 'production-recap')"/>
-    <table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap">
+    <table class="scrap" summary="Scrap">
       <tbody>
         <xsl:apply-templates select="//prod" mode="ref"/>
       </tbody>
@@ -1516,7 +1536,7 @@
   <!-- proto: function prototype -->
   <!-- type and name of the function, with arguments in parens -->
   <xsl:template match="proto">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <em><xsl:value-of select="@return-type"/></em>
       <xsl:text> </xsl:text>
       <b><xsl:value-of select="@name"/></b>
@@ -1532,14 +1552,14 @@
   <!-- publoc: location of current version of spec -->
   <!-- called from header in <dl> context -->
   <xsl:template match="publoc">
-    <dt xmlns="http://www.w3.org/1999/xhtml">This version:</dt>
-    <dd xmlns="http://www.w3.org/1999/xhtml">
+    <dt>This version:</dt>
+    <dd>
       <xsl:apply-templates/>
     </dd>
   </xsl:template>
 
   <xsl:template match="altlocs">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <xsl:text>This document is also available </xsl:text>
       <xsl:text>in these non-normative formats: </xsl:text>
       <xsl:for-each select="loc">
@@ -1551,7 +1571,7 @@
             <xsl:text> </xsl:text>
           </xsl:if>
         </xsl:if>
-        <xsl:if test="position() = last() and position() &gt; 1">and </xsl:if>
+        <xsl:if test="position() = last() and position() &gt; 1">and&#160;</xsl:if>
         <xsl:apply-templates select="."/>
       </xsl:for-each>
       <xsl:text>.</xsl:text>
@@ -1559,7 +1579,7 @@
   </xsl:template>
 
   <xsl:template match="errataloc">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <xsl:text>Please refer to the </xsl:text>
       <a href="{@href}">errata</a>
       <xsl:text> for this document, which may
@@ -1568,7 +1588,7 @@
   </xsl:template>
 
   <xsl:template match="preverrataloc">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <xsl:text>The </xsl:text>
       <a href="{@href}">previous errata</a>
       <xsl:text> for this document, are also available.</xsl:text>
@@ -1576,7 +1596,7 @@
   </xsl:template>
 
   <xsl:template match="translationloc">
-    <p xmlns="http://www.w3.org/1999/xhtml">See also <a href="{@href}"><strong>translations</strong></a>.</p>
+    <p>See also <a href="{@href}"><strong>translations</strong></a>.</p>
   </xsl:template>
 
   <!-- pubstmt: statement of publication -->
@@ -1599,7 +1619,7 @@
 
   <!-- resolution: resolution of an issue -->
   <xsl:template match="resolution">
-    <p xmlns="http://www.w3.org/1999/xhtml" class="prefix">
+    <p class="prefix">
       <b>
         <xsl:if test="@role='partial'">Partial </xsl:if>
         <xsl:text>Resolution:</xsl:text>
@@ -1620,7 +1640,7 @@
   <xsl:template match="rhs">
     <xsl:choose>
       <xsl:when test="preceding-sibling::*[1][name()='lhs']">
-        <td xmlns="http://www.w3.org/1999/xhtml">
+        <td>
           <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
             <xsl:attribute name="class">
               <xsl:text>diff-</xsl:text>
@@ -1629,10 +1649,14 @@
           </xsl:if>
           <code><xsl:apply-templates/></code>
         </td>
-        <xsl:apply-templates select="following-sibling::*[1][name()='com' or                                           name()='constraint' or                                           name()='vc' or                                           name()='wfc']"/>
+        <xsl:apply-templates
+          select="following-sibling::*[1][name()='com' or
+                                          name()='constraint' or
+                                          name()='vc' or
+                                          name()='wfc']"/>
       </xsl:when>
       <xsl:otherwise>
-        <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+        <tr valign="baseline">
           <td/><td/><td/>
           <td>
             <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
@@ -1643,7 +1667,11 @@
             </xsl:if>
             <code><xsl:apply-templates/></code>
           </td>
-          <xsl:apply-templates select="following-sibling::*[1][name()='com' or                                             name()='constraint' or                                             name()='vc' or                                             name()='wfc']"/>
+          <xsl:apply-templates
+            select="following-sibling::*[1][name()='com' or
+                                            name()='constraint' or
+                                            name()='vc' or
+                                            name()='wfc']"/>
         </tr>
       </xsl:otherwise>
     </xsl:choose>
@@ -1652,7 +1680,7 @@
   <!-- role: part played by a member of an organization -->
   <xsl:template match="role">
     <xsl:text> (</xsl:text>
-    <i xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></i>
+    <i><xsl:apply-templates/></i>
     <xsl:text>) </xsl:text>
   </xsl:template>
 
@@ -1660,7 +1688,7 @@
   <!-- set up a <table> and handle children -->
   <xsl:template match="scrap">
     <xsl:apply-templates select="head"/>
-    <table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap">
+    <table class="scrap" summary="Scrap">
       <xsl:apply-templates select="bnf | prod | prodgroup"/>
     </table>
   </xsl:template>
@@ -1675,14 +1703,14 @@
   </xsl:template>
 
   <xsl:template match="sitem[position() &gt; 1]" priority="2">
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
+    <br/>
     <xsl:apply-templates/>
   </xsl:template>
 
   <!-- slist: simple list -->
   <!-- using a <blockquote> to indent the list is very wrong, but it works -->
   <xsl:template match="slist">
-    <blockquote xmlns="http://www.w3.org/1999/xhtml">
+    <blockquote>
       <p>
         <xsl:apply-templates/>
       </p>
@@ -1691,7 +1719,7 @@
 
   <!-- source: the source of an issue -->
   <xsl:template match="source">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <b>Source</b>
       <xsl:text>: </xsl:text>
       <xsl:apply-templates/>
@@ -1703,7 +1731,7 @@
 
   <!-- spec: the specification itself -->
   <xsl:template match="spec">
-    <html xmlns="http://www.w3.org/1999/xhtml">
+    <html>
       <xsl:if test="header/langusage/language">
         <xsl:attribute name="lang">
           <xsl:value-of select="header/langusage/language/@id"/>
@@ -1729,8 +1757,7 @@
         <xsl:if test="//footnote[not(ancestor::table)]">
           <hr/>
           <div class="endnotes">
-            <xsl:text>
-</xsl:text>
+            <xsl:text>&#10;</xsl:text>
             <h3>
               <xsl:call-template name="anchor">
                 <xsl:with-param name="conditional" select="0"/>
@@ -1739,7 +1766,8 @@
               <xsl:text>End Notes</xsl:text>
             </h3>
             <dl>
-              <xsl:apply-templates select="//footnote[not(ancestor::table)]" mode="notes"/>
+              <xsl:apply-templates select="//footnote[not(ancestor::table)]"
+                                   mode="notes"/>
             </dl>
           </div>
         </xsl:if>
@@ -1760,7 +1788,14 @@
 	  <xsl:value-of select="@ref"/>
 	</xsl:message>
       </xsl:when>
-      <xsl:when test="local-name($target)='issue'                       or starts-with(local-name($target), 'div')                       or starts-with(local-name($target), 'inform-div')                       or local-name($target) = 'vcnote'                       or local-name($target) = 'prod'                       or local-name($target) = 'example'                       or local-name($target) = 'label'         or $target/self::item[parent::olist]">
+      <xsl:when test="local-name($target)='issue'
+                      or starts-with(local-name($target), 'div')
+                      or starts-with(local-name($target), 'inform-div')
+                      or local-name($target) = 'vcnote'
+                      or local-name($target) = 'prod'
+                      or local-name($target) = 'example'
+                      or local-name($target) = 'label'
+		      or $target/self::item[parent::olist]">
         <xsl:apply-templates select="$target" mode="specref"/>
       </xsl:when>
       <xsl:otherwise>
@@ -1772,7 +1807,7 @@
           <xsl:text>] </xsl:text>
           <xsl:text> (Contact stylesheet maintainer).</xsl:text>
         </xsl:message>
-        <b xmlns="http://www.w3.org/1999/xhtml">
+        <b>
           <a>
             <xsl:attribute name="href">
               <xsl:call-template name="href.target">
@@ -1789,7 +1824,7 @@
   <xsl:template match="item" mode="specref">
     <xsl:variable name="items" select="ancestor-or-self::item[parent::olist]"/>
 
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target"/>
       </xsl:attribute>
@@ -1846,7 +1881,7 @@
 
   <xsl:template match="issue" mode="specref">
     <xsl:text>[</xsl:text>
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target"/>
       </xsl:attribute>
@@ -1861,7 +1896,7 @@
   </xsl:template>
 
   <xsl:template match="div1|div2|div3|div4|div5" mode="specref">
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target"/>
       </xsl:attribute>
@@ -1873,7 +1908,7 @@
   </xsl:template>
 
   <xsl:template match="inform-div1" mode="specref">
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target"/>
       </xsl:attribute>
@@ -1885,7 +1920,7 @@
   </xsl:template>
 
   <xsl:template match="vcnote" mode="specref">
-    <b xmlns="http://www.w3.org/1999/xhtml">
+    <b>
       <xsl:text>[VC: </xsl:text>
       <a>
         <xsl:attribute name="href">
@@ -1898,7 +1933,7 @@
   </xsl:template>
 
   <xsl:template match="prod" mode="specref">
-    <b xmlns="http://www.w3.org/1999/xhtml">
+    <b>
       <xsl:text>[PROD: </xsl:text>
       <a>
         <xsl:attribute name="href">
@@ -1911,7 +1946,7 @@
   </xsl:template>
 
   <xsl:template match="label" mode="specref">
-    <b xmlns="http://www.w3.org/1999/xhtml">
+    <b>
       <xsl:text>[</xsl:text>
       <a>
         <xsl:attribute name="href">
@@ -1934,7 +1969,7 @@
       </xsl:call-template>
     </xsl:variable>
 
-    <a xmlns="http://www.w3.org/1999/xhtml" href="#{$id}">
+    <a href="#{$id}">
       <xsl:text>Example</xsl:text>
     </a>
   </xsl:template>
@@ -1943,9 +1978,8 @@
 
   <!-- status: the status of the spec -->
   <xsl:template match="status">
-    <div xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:text>
-</xsl:text>
+    <div>
+      <xsl:text>&#10;</xsl:text>
       <h2>
         <xsl:call-template name="anchor">
           <xsl:with-param name="conditional" select="0"/>
@@ -1966,7 +2000,7 @@
 
   <!-- sub: subscript -->
   <xsl:template match="sub">
-    <sub xmlns="http://www.w3.org/1999/xhtml">
+    <sub>
       <xsl:apply-templates/>
     </sub>
   </xsl:template>
@@ -1979,7 +2013,7 @@
 
   <!-- sup: superscript -->
   <xsl:template match="sup">
-    <sup xmlns="http://www.w3.org/1999/xhtml">
+    <sup>
       <xsl:apply-templates/>
     </sup>
   </xsl:template>
@@ -1987,7 +2021,7 @@
   <!-- table: the HTML table model adopted wholesale; note however that we -->
   <!-- do this such that the XHTML stylesheet will do the right thing. -->
   <xsl:template match="caption|col|colgroup|tfoot|thead|tr|tbody">
-    <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
+    <xsl:element name="{local-name(.)}">
       <xsl:for-each select="@*">
         <!-- Wait: some of these aren't HTML attributes after all... -->
         <xsl:choose>
@@ -2010,7 +2044,7 @@
 
   <!-- td/th are special -->
   <xsl:template match="td|th">
-    <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
+    <xsl:element name="{local-name(.)}">
       <xsl:for-each select="@*">
         <!-- Wait: some of these aren't HTML attributes after all... -->
 	<xsl:choose>
@@ -2034,7 +2068,7 @@
   <!-- but table is special, to handle footnotes -->
   <xsl:template match="table">
     <xsl:call-template name="anchor"/>
-    <table xmlns="http://www.w3.org/1999/xhtml">
+    <table>
       <xsl:for-each select="@*">
         <!-- Wait: some of these aren't HTML attributes after all... -->
         <xsl:choose>
@@ -2067,13 +2101,13 @@
 
   <!-- term: the actual mention of a term within a termdef -->
   <xsl:template match="term">
-    <b xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></b>
+    <b><xsl:apply-templates/></b>
   </xsl:template>
 
   <!-- termdef: sentence or phrase defining a term -->
   <xsl:template match="termdef">
     <xsl:text>[</xsl:text>
-    <a xmlns="http://www.w3.org/1999/xhtml" name="{@id}" id="{@id}" title="{@term}">
+    <a name="{@id}" id="{@id}" title="{@term}">
       <xsl:text>Definition</xsl:text>
     </a>
     <xsl:text>: </xsl:text>
@@ -2083,7 +2117,7 @@
 
   <!-- termref: reference to a defined term -->
   <xsl:template match="termref">
-    <a xmlns="http://www.w3.org/1999/xhtml" title="{key('ids', @def)/@term}">
+    <a title="{key('ids', @def)/@term}">
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="key('ids', @def)"/>
@@ -2105,21 +2139,21 @@
   <xsl:template match="titleref">
     <xsl:choose>
       <xsl:when test="@href">
-        <a xmlns="http://www.w3.org/1999/xhtml" href="{@href}">
+        <a href="{@href}">
           <cite>
             <xsl:apply-templates/>
           </cite>
         </a>
       </xsl:when>
       <xsl:when test="ancestor::bibl/@href">
-        <a xmlns="http://www.w3.org/1999/xhtml" href="{ancestor::bibl/@href}">
+        <a href="{ancestor::bibl/@href}">
           <cite>
             <xsl:apply-templates/>
           </cite>
         </a>
       </xsl:when>
       <xsl:otherwise>
-        <cite xmlns="http://www.w3.org/1999/xhtml">
+        <cite>
           <xsl:apply-templates/>
         </cite>
       </xsl:otherwise>
@@ -2136,7 +2170,7 @@
 
   <!-- ulist: unordered list -->
   <xsl:template match="ulist">
-    <ul xmlns="http://www.w3.org/1999/xhtml">
+    <ul>
       <xsl:apply-templates/>
     </ul>
   </xsl:template>
@@ -2146,7 +2180,7 @@
 
   <!-- var: a variable -->
   <xsl:template match="var">
-    <var xmlns="http://www.w3.org/1999/xhtml">
+    <var>
       <xsl:apply-templates/>
     </var>
   </xsl:template>
@@ -2155,7 +2189,7 @@
   <xsl:template match="vc">
     <xsl:choose>
       <xsl:when test="preceding-sibling::*[1][name()='rhs']">
-        <td xmlns="http://www.w3.org/1999/xhtml">
+        <td>
           <xsl:if test="@diff and $show.diff.markup != 0">
             <xsl:attribute name="class">
               <xsl:text>diff-</xsl:text>
@@ -2175,7 +2209,7 @@
         </td>
       </xsl:when>
       <xsl:otherwise>
-        <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+        <tr valign="baseline">
           <td/><td/><td/><td/>
           <td>
             <xsl:if test="@diff and $show.diff.markup != 0">
@@ -2202,7 +2236,7 @@
 
   <!-- vcnote: validity check note after a formal production -->
   <xsl:template match="vcnote">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="constraint">
+    <div class="constraint">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -2220,7 +2254,7 @@
   <xsl:template match="wfc">
     <xsl:choose>
       <xsl:when test="preceding-sibling::*[1][name()='rhs']">
-        <td xmlns="http://www.w3.org/1999/xhtml">
+        <td>
           <xsl:if test="@diff and $show.diff.markup != 0">
             <xsl:attribute name="class">
               <xsl:text>diff-</xsl:text>
@@ -2240,7 +2274,7 @@
         </td>
       </xsl:when>
       <xsl:otherwise>
-        <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+        <tr valign="baseline">
           <td/><td/><td/><td/>
           <td>
             <xsl:if test="@diff and $show.diff.markup != 0">
@@ -2267,7 +2301,7 @@
 
   <!-- wfcnote: well-formedness check note after formal production -->
   <xsl:template match="wfcnote">
-    <div xmlns="http://www.w3.org/1999/xhtml" class="constraint">
+    <div class="constraint">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
@@ -2277,7 +2311,7 @@
   <!-- xtermref: external term reference -->
   <!-- just link to URI provided -->
   <xsl:template match="xnt | xspecref | xtermref">
-    <a xmlns="http://www.w3.org/1999/xhtml" href="{@href}">
+    <a href="{@href}">
       <xsl:apply-templates/>
     </a>
   </xsl:template>
@@ -2292,7 +2326,7 @@
        show up in a spec, but they're easy to handle and you just
        never know. -->
   <xsl:template match="a|div|em|h1|h2|h3|h4|h5|h6|li|ol|pre|ul">
-    <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
+    <xsl:element name="{local-name(.)}">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </xsl:element>
@@ -2300,44 +2334,44 @@
 
   <!-- legacy XML spec stuff -->
   <xsl:template match="htable">
-    <table xmlns="http://www.w3.org/1999/xhtml" summary="HTML Table">
+    <table summary="HTML Table">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </table>
   </xsl:template>
   <xsl:template match="htbody">
-    <tbody xmlns="http://www.w3.org/1999/xhtml">
+    <tbody>
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </tbody>
   </xsl:template>
   <xsl:template match="key-term">
-    <b xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates/></b>
+    <b><xsl:apply-templates/></b>
   </xsl:template>
   <xsl:template match="statusp">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <xsl:apply-templates/>
     </p>
   </xsl:template>
 
   <!-- legacy DocBook stuff -->
   <xsl:template match="itemizedlist">
-    <ul xmlns="http://www.w3.org/1999/xhtml">
+    <ul>
       <xsl:apply-templates/>
     </ul>
   </xsl:template>
   <xsl:template match="listitem">
-    <li xmlns="http://www.w3.org/1999/xhtml">
+    <li>
       <xsl:apply-templates/>
     </li>
   </xsl:template>
   <xsl:template match="orderedlist">
-    <ol xmlns="http://www.w3.org/1999/xhtml">
+    <ol>
       <xsl:apply-templates/>
     </ol>
   </xsl:template>
   <xsl:template match="para">
-    <p xmlns="http://www.w3.org/1999/xhtml">
+    <p>
       <xsl:apply-templates/>
     </p>
   </xsl:template>
@@ -2351,38 +2385,48 @@
     <xsl:number count="div1 | inform-div1" format="A "/>
   </xsl:template>
 
-  <xsl:template mode="divnum" match="front/div1 | front//div2 | front//div3 | front//div4 | front//div5"/>
+  <xsl:template mode="divnum"
+    match="front/div1 | front//div2 | front//div3 | front//div4 | front//div5"/>
 
   <xsl:template mode="divnum" match="div2">
     <xsl:number level="multiple" count="div1 | div2" format="1.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="back//div2">
-    <xsl:number level="multiple" count="div1 | div2 | inform-div1" format="A.1 "/>
+    <xsl:number level="multiple" count="div1 | div2 | inform-div1"
+      format="A.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="div3">
-    <xsl:number level="multiple" count="div1 | div2 | div3" format="1.1.1 "/>
+    <xsl:number level="multiple" count="div1 | div2 | div3"
+      format="1.1.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="back//div3">
-    <xsl:number level="multiple" count="div1 | div2 | div3 | inform-div1" format="A.1.1 "/>
+    <xsl:number level="multiple"
+      count="div1 | div2 | div3 | inform-div1" format="A.1.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="div4">
-    <xsl:number level="multiple" count="div1 | div2 | div3 | div4" format="1.1.1.1 "/>
+    <xsl:number level="multiple" count="div1 | div2 | div3 | div4"
+      format="1.1.1.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="back//div4">
-    <xsl:number level="multiple" count="div1 | div2 | div3 | div4 | inform-div1" format="A.1.1.1 "/>
+    <xsl:number level="multiple"
+      count="div1 | div2 | div3 | div4 | inform-div1"
+      format="A.1.1.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="div5">
-    <xsl:number level="multiple" count="div1 | div2 | div3 | div4 | div5" format="1.1.1.1.1 "/>
+    <xsl:number level="multiple"
+      count="div1 | div2 | div3 | div4 | div5" format="1.1.1.1.1 "/>
   </xsl:template>
 
   <xsl:template mode="divnum" match="back//div5">
-    <xsl:number level="multiple" count="div1 | div2 | div3 | div4 | div5 | inform-div1" format="A.1.1.1.1 "/>
+    <xsl:number level="multiple"
+      count="div1 | div2 | div3 | div4 | div5 | inform-div1"
+      format="A.1.1.1.1 "/>
   </xsl:template>
 
   <!-- mode: notes -->
@@ -2397,14 +2441,14 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-    <dt xmlns="http://www.w3.org/1999/xhtml">
+    <dt>
       <xsl:text>[</xsl:text>
       <a name="{$this-note-id}" id="{$this-note-id}" href="#FN-ANCH-{$this-note-id}">
         <xsl:apply-templates select="." mode="number-simple"/>
       </a>
       <xsl:text>]</xsl:text>
     </dt>
-    <dd xmlns="http://www.w3.org/1999/xhtml">
+    <dd>
       <xsl:apply-templates/>
     </dd>
   </xsl:template>
@@ -2425,7 +2469,7 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-    <p xmlns="http://www.w3.org/1999/xhtml" class="table.footnote">
+    <p class="table.footnote">
       <sup>
         <a name="{$this-note-id}" id="{$this-note-id}" href="#FN-ANCH-{$this-note-id}">
           <xsl:apply-templates select="parent::footnote" mode="number-simple"/>
@@ -2450,12 +2494,14 @@
 
   <xsl:template mode="number" match="prod[@diff='add']">
     <xsl:text>[</xsl:text>
-    <xsl:apply-templates select="preceding::prod[not(@diff='add')][1]" mode="number-simple"/>
+    <xsl:apply-templates select="preceding::prod[not(@diff='add')][1]"
+      mode="number-simple"/>
 <!--
   Once again, this could be done right here, but XT won't hear of it.
     <xsl:number level="any" count="prod[not(@diff='add')]"/>
   -->
-    <xsl:number level="any" count="prod[@diff='add']" from="prod[not(@diff='add')]" format="a"/>
+    <xsl:number level="any" count="prod[@diff='add']"
+      from="prod[not(@diff='add')]" format="a"/>
     <xsl:text>]</xsl:text>
   </xsl:template>
 
@@ -2478,7 +2524,7 @@
 
   <!-- mode: ref -->
   <xsl:template match="lhs" mode="ref">
-    <tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline">
+    <tr valign="baseline">
       <td>
         <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
           <xsl:attribute name="class">
@@ -2487,7 +2533,7 @@
           </xsl:attribute>
         </xsl:if>
         <xsl:apply-templates select="ancestor::prod" mode="number"/>
-        <xsl:text>   </xsl:text>
+        <xsl:text>&#xa0;&#xa0;&#xa0;</xsl:text>
       </td>
       <td>
         <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup != 0">
@@ -2514,15 +2560,21 @@
             <xsl:value-of select="ancestor-or-self::*/@diff"/>
           </xsl:attribute>
         </xsl:if>
-        <xsl:text>   ::=   </xsl:text>
+        <xsl:text>&#xa0;&#xa0;&#xa0;::=&#xa0;&#xa0;&#xa0;</xsl:text>
       </td>
-      <xsl:apply-templates select="following-sibling::*[1][name()='rhs']"/>
+      <xsl:apply-templates
+        select="following-sibling::*[1][name()='rhs']"/>
     </tr>
   </xsl:template>
 
   <xsl:template mode="ref" match="prod">
     <xsl:apply-templates select="lhs" mode="ref"/>
-    <xsl:apply-templates select="rhs[preceding-sibling::*[1][name()!='lhs']] |               com[preceding-sibling::*[1][name()!='rhs']] |               constraint[preceding-sibling::*[1][name()!='rhs']] |               vc[preceding-sibling::*[1][name()!='rhs']] |               wfc[preceding-sibling::*[1][name()!='rhs']]"/>
+    <xsl:apply-templates
+      select="rhs[preceding-sibling::*[1][name()!='lhs']] |
+              com[preceding-sibling::*[1][name()!='rhs']] |
+              constraint[preceding-sibling::*[1][name()!='rhs']] |
+              vc[preceding-sibling::*[1][name()!='rhs']] |
+              wfc[preceding-sibling::*[1][name()!='rhs']]"/>
   </xsl:template>
 
   <!-- mode: text -->
@@ -2533,45 +2585,7 @@
   <!-- mode: toc -->
   <xsl:template mode="toc" match="div1">
     <xsl:apply-templates select="." mode="divnum"/>
-    <a xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:attribute name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="target" select="."/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:apply-templates select="head" mode="text"/>
-    </a>
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
-    <xsl:text>
-</xsl:text>
-    <xsl:if test="$toc.level &gt; 1">
-      <xsl:apply-templates select="div2" mode="toc"/>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template mode="toc" match="div2">
-    <xsl:text>    </xsl:text>
-    <xsl:apply-templates select="." mode="divnum"/>
-    <a xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:attribute name="href">
-        <xsl:call-template name="href.target">
-          <xsl:with-param name="target" select="."/>
-        </xsl:call-template>
-      </xsl:attribute>
-      <xsl:apply-templates select="head" mode="text"/>
-    </a>
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
-    <xsl:text>
-</xsl:text>
-    <xsl:if test="$toc.level &gt; 2">
-      <xsl:apply-templates select="div3" mode="toc"/>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template mode="toc" match="div3">
-    <xsl:text>        </xsl:text>
-    <xsl:apply-templates select="." mode="divnum"/>
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="."/>
@@ -2579,18 +2593,17 @@
       </xsl:attribute>
       <xsl:apply-templates select="head" mode="text"/>
     </a>
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
-    <xsl:text>
-</xsl:text>
-    <xsl:if test="$toc.level &gt; 3">
-      <xsl:apply-templates select="div4" mode="toc"/>
+    <br/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:if test="$toc.level &gt; 1">
+      <xsl:apply-templates select="div2" mode="toc"/>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template mode="toc" match="div4">
-    <xsl:text>            </xsl:text>
+  <xsl:template mode="toc" match="div2">
+    <xsl:text>&#xa0;&#xa0;&#xa0;&#xa0;</xsl:text>
     <xsl:apply-templates select="." mode="divnum"/>
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="."/>
@@ -2598,18 +2611,17 @@
       </xsl:attribute>
       <xsl:apply-templates select="head" mode="text"/>
     </a>
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
-    <xsl:text>
-</xsl:text>
-    <xsl:if test="$toc.level &gt; 4">
-      <xsl:apply-templates select="div5" mode="toc"/>
+    <br/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:if test="$toc.level &gt; 2">
+      <xsl:apply-templates select="div3" mode="toc"/>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template mode="toc" match="div5">
-    <xsl:text>                </xsl:text>
+  <xsl:template mode="toc" match="div3">
+    <xsl:text>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</xsl:text>
     <xsl:apply-templates select="." mode="divnum"/>
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="."/>
@@ -2617,14 +2629,49 @@
       </xsl:attribute>
       <xsl:apply-templates select="head" mode="text"/>
     </a>
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
-    <xsl:text>
-</xsl:text>
+    <br/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:if test="$toc.level &gt; 3">
+      <xsl:apply-templates select="div4" mode="toc"/>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template mode="toc" match="div4">
+    <xsl:text>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</xsl:text>
+    <xsl:apply-templates select="." mode="divnum"/>
+    <a>
+      <xsl:attribute name="href">
+        <xsl:call-template name="href.target">
+          <xsl:with-param name="target" select="."/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:apply-templates select="head" mode="text"/>
+    </a>
+    <br/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:if test="$toc.level &gt; 4">
+      <xsl:apply-templates select="div5" mode="toc"/>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template mode="toc" match="div5">
+    <xsl:text>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</xsl:text>
+    <xsl:apply-templates select="." mode="divnum"/>
+    <a>
+      <xsl:attribute name="href">
+        <xsl:call-template name="href.target">
+          <xsl:with-param name="target" select="."/>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:apply-templates select="head" mode="text"/>
+    </a>
+    <br/>
+    <xsl:text>&#10;</xsl:text>
   </xsl:template>
 
   <xsl:template mode="toc" match="inform-div1">
     <xsl:apply-templates select="." mode="divnum"/>
-    <a xmlns="http://www.w3.org/1999/xhtml">
+    <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="target" select="."/>
@@ -2633,16 +2680,15 @@
       <xsl:apply-templates select="head" mode="text"/>
     </a>
     <xsl:text> (Non-Normative)</xsl:text>
-    <br xmlns="http://www.w3.org/1999/xhtml"/>
-    <xsl:text>
-</xsl:text>
+    <br/>
+    <xsl:text>&#10;</xsl:text>
     <xsl:if test="$toc.level &gt; 2">
       <xsl:apply-templates select="div2" mode="toc"/>
     </xsl:if>
   </xsl:template>
 
   <xsl:template name="css">
-    <style xmlns="http://www.w3.org/1999/xhtml" type="text/css">
+    <style type="text/css">
       <xsl:text>
 code           { font-family: monospace; }
 
@@ -2679,7 +2725,7 @@
       </xsl:if>
       <xsl:value-of select="$additional.css"/>
     </style>
-    <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" type="text/css">
+    <link rel="stylesheet" type="text/css">
       <xsl:attribute name="href">
         <xsl:text>http://www.w3.org/StyleSheets/TR/</xsl:text>
         <xsl:choose>
@@ -2687,7 +2733,9 @@
           <xsl:otherwise>
             <xsl:choose>
 	      <!-- Editor's review drafts are a special case. -->
-              <xsl:when test="/spec/@w3c-doctype='review'          or contains(/spec/header/w3c-doctype, 'Editor')">W3C-ED</xsl:when>
+              <xsl:when test="/spec/@w3c-doctype='review'
+			      or contains(/spec/header/w3c-doctype, 'Editor')"
+			>W3C-ED</xsl:when>
               <xsl:when test="/spec/@w3c-doctype='wd'">W3C-WD</xsl:when>
               <xsl:when test="/spec/@w3c-doctype='rec'">W3C-REC</xsl:when>
               <xsl:when test="/spec/@w3c-doctype='pr'">W3C-PR</xsl:when>
@@ -2757,7 +2805,7 @@
     </xsl:call-template>
   </xsl:variable>
   <xsl:if test="$conditional = 0 or $node/@id">
-    <a xmlns="http://www.w3.org/1999/xhtml" name="{$id}" id="{$id}"/>
+    <a name="{$id}" id="{$id}"/>
   </xsl:if>
 </xsl:template>