forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r481452 - in /forrest/trunk/whiteboard/forrest2/wicket-demo/src: xdocs/navigation.xml xslt/navigation-to-internal.xsl
Date Sat, 02 Dec 2006 00:09:42 GMT
Author: rgardler
Date: Fri Dec  1 16:09:41 2006
New Revision: 481452

URL: http://svn.apache.org/viewvc?view=rev&rev=481452
Log:
Add navigation link to subdir index

Modified:
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/xslt/navigation-to-internal.xsl

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml?view=diff&rev=481452&r1=481451&r2=481452
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml Fri Dec  1 16:09:41
2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <navigation>
-  <item label="Item 1"/>
+  <item label="Subdir" href="subdir/index.html"/>
   <item label="Item 2"/>
   <item label="Item 3"/>
 </navigation>

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/xslt/navigation-to-internal.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/xslt/navigation-to-internal.xsl?view=diff&rev=481452&r1=481451&r2=481452
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/xslt/navigation-to-internal.xsl (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/xslt/navigation-to-internal.xsl Fri
Dec  1 16:09:41 2006
@@ -37,7 +37,17 @@
 	
 	<xsl:template match="item">
 	  <li>
-	    <xsl:value-of select="@label"/>
+	    <xsl:choose>
+	    <xsl:when test="@href">
+	    <a>
+	      <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
+	      <xsl:value-of select="@label"/>
+	    </a>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:value-of select="@label"/>
+	    </xsl:otherwise>
+	    </xsl:choose>
 	  </li>
 	</xsl:template>
 



Mime
View raw message