forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r312886 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisyNavigation2siteSnippet.xsl
Date Tue, 11 Oct 2005 14:00:42 GMT
Author: rgardler
Date: Tue Oct 11 07:00:34 2005
New Revision: 312886

URL: http://svn.apache.org/viewcvs?rev=312886&view=rev
Log:
better handle nested elements

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisyNavigation2siteSnippet.xsl

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisyNavigation2siteSnippet.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisyNavigation2siteSnippet.xsl?rev=312886&r1=312885&r2=312886&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisyNavigation2siteSnippet.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisyNavigation2siteSnippet.xsl
Tue Oct 11 07:00:34 2005
@@ -26,11 +26,27 @@
   </xsl:template>
   
   <xsl:template match="d:doc">
-    <doc>
-      <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
-      <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
-      <xsl:attribute name="href"><xsl:value-of select="@id"/>.daisy.html</xsl:attribute>
-    </doc>
+    <xsl:choose>
+      <xsl:when test="d:doc">
+        <group>
+          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+          <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
+          <doc>
+            <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+            <xsl:attribute name="label">Section Home</xsl:attribute>
+            <xsl:attribute name="href"><xsl:value-of select="@id"/>.daisy.html</xsl:attribute>
+          </doc>
+          <xsl:apply-templates/>
+        </group>
+      </xsl:when>
+      <xsl:otherwise test="d:doc">
+        <doc>
+          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+          <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
+          <xsl:attribute name="href"><xsl:value-of select="@id"/>.daisy.html</xsl:attribute>
+        </doc>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
     
   <xsl:template match="d:group">



Mime
View raw message