diff software/mpdl-services/mpiwg-mpdl-cms/build/classes/de/mpg/mpiwg/berlin/mpdl/cms/transform/tocHtml.xsl @ 23:e845310098ba

diverse Korrekturen
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Tue, 27 Nov 2012 12:35:19 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/software/mpdl-services/mpiwg-mpdl-cms/build/classes/de/mpg/mpiwg/berlin/mpdl/cms/transform/tocHtml.xsl	Tue Nov 27 12:35:19 2012 +0100
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet 
+  version="2.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:output method="xhtml" encoding="utf-8"/>
+
+<xsl:param name="type"></xsl:param>
+
+<xsl:template match="/">
+  <xsl:apply-templates select="//*:list[@type = $type]/head"/>
+  <xsl:apply-templates select="//*:list[@type = $type]/item"/>
+</xsl:template>
+
+<xsl:template match="*:item">
+  <xsl:variable name="n" select="@n"/>
+  <xsl:variable name="level" select="@lv"/>
+  <div>
+    <xsl:attribute name="class"><xsl:value-of select="'item'"/></xsl:attribute>
+    <xsl:value-of select="concat($n, ' ')"/>
+    <xsl:apply-templates/>
+  </div>
+</xsl:template>
+
+<xsl:template match="*:ref">
+  <xsl:variable name="o" select="@o"/>
+  <span>
+    <xsl:attribute name="class"><xsl:value-of select="'ref'"/></xsl:attribute>
+    <xsl:value-of select="'Page: '"/>
+    <xsl:apply-templates/>
+  </span>
+</xsl:template>
+
+</xsl:stylesheet>