html.xsl
branchstyles
changeset 20 78ac9176f4ef
parent 16 357ad8c99f4a
child 21 ce4faf661fca
--- a/html.xsl	Mon Sep 14 11:30:58 2015 -0400
+++ b/html.xsl	Mon Sep 14 11:32:00 2015 -0400
@@ -204,6 +204,11 @@
 <xsl:template match="para">
   <p><xsl:apply-templates/></p>
 </xsl:template>
+<xsl:template match="para[list|shortlist]">
+  <div>
+    <xsl:apply-templates select="list|shortlist"/>
+  </div>
+</xsl:template>
 
 <!-- formalpara processing -->
 <xsl:template match="formalpara/para">
@@ -300,7 +305,7 @@
   <xsl:value-of select="title/text()"/>
 </xsl:template>
 
-<xsl:template match="section|story|poetry" mode="navbar-link">
+<xsl:template match="section|story|poetry" mode="href">
   <xsl:call-template name="get-id"/>
 </xsl:template>
 
@@ -308,7 +313,7 @@
   <xsl:param name="prefix"></xsl:param>
   <a>
     <xsl:attribute name="href">
-      <xsl:apply-templates select="." mode="navbar-link"/>
+      <xsl:apply-templates select="." mode="href"/>
       <xsl:text>.html</xsl:text>
     </xsl:attribute>
     <xsl:value-of select="$prefix"/>
@@ -460,6 +465,17 @@
 
 <xsl:template match="*" mode="xref"/>
 
+<xsl:template match="link">
+  <xsl:variable name="linkend" select="@linkend"/>
+  <a>
+    <xsl:attribute name="href">
+      <xsl:apply-templates select="//*[@id=$linkend]" mode="href"/>
+      <xsl:text>.html</xsl:text>
+    </xsl:attribute>
+    <xsl:apply-templates/>
+  </a>
+</xsl:template>
+
 <xsl:template match="section/title"/>
 <xsl:template match="section/subtitle"/>