Added edit:elementindex to generate list of elements in alphabetic order.
authortbah <tavmjong@free.fr>
Mon, 21 Nov 2011 14:25:20 +0100
changeset 6 fd5ea2f3c535
parent 5 54c78506b887
child 16 a0b9d7838b06
Added edit:elementindex to generate list of elements in alphabetic order.
Also, set xsl:output indent to "yes" to make debugging html easier.
publish.xsl
--- a/publish.xsl	Sat Nov 12 20:00:31 2011 +0100
+++ b/publish.xsl	Mon Nov 21 14:25:20 2011 +0100
@@ -16,7 +16,7 @@
                 version="2.0">
 
   <xsl:output method='text'/>
-  <xsl:output name='chapter' method='xml' omit-xml-declaration='yes' doctype-public='-//W3C//DTD XHTML 1.0 Transitional//EN' doctype-system='http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'/>
+  <xsl:output name='chapter' method='xml' omit-xml-declaration='yes' doctype-public='-//W3C//DTD XHTML 1.0 Transitional//EN' doctype-system='http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' indent="yes" saxon:indent-spaces="1"/>
 
   <xsl:namespace-alias stylesheet-prefix='_xml' result-prefix='xml'/>
 
@@ -1334,6 +1334,15 @@
     </table>
   </xsl:template>
 
+  <xsl:template match='edit:elementindex'>
+    <ul class='element-index' summary='Alphabetic list of elements'>
+      <xsl:for-each select='$defs//x:element'>
+        <xsl:sort select='@name'/>
+	<li><xsl:copy-of select='x:element-link(@name, .)'/></li>
+      </xsl:for-each>
+    </ul>
+  </xsl:template>
+
   <xsl:template match='edit:elementcategory'>
     <xsl:variable name='elementcategory' select='$defs/x:elementcategory[@name=current()/@name]'/>
     <xsl:variable name='all'>