forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject svn commit: rev 36179 - forrest/trunk/src/core/context/resources/stylesheets/aggregates
Date Tue, 10 Aug 2004 14:08:56 GMT
Author: brondsem
Date: Tue Aug 10 07:08:56 2004
New Revision: 36179

Modified:
   forrest/trunk/src/core/context/resources/stylesheets/aggregates/book2cinclude.xsl
Log:
aggregate handling of fragments in site.xml

Modified: forrest/trunk/src/core/context/resources/stylesheets/aggregates/book2cinclude.xsl
==============================================================================
--- forrest/trunk/src/core/context/resources/stylesheets/aggregates/book2cinclude.xsl	(original)
+++ forrest/trunk/src/core/context/resources/stylesheets/aggregates/book2cinclude.xsl	Tue
Aug 10 07:08:56 2004
@@ -20,6 +20,8 @@
 handled by uncommenting the relevant section.
 
 jefft@apache.org
+
+See http://127.0.0.1:8888/book-site.html to see what the book xml looks like
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:cinclude="http://apache.org/cocoon/include/1.0">
@@ -39,7 +41,8 @@
   </xsl:template>
 
 
-  <xsl:template match="menu">
+  <xsl:template match="menu[contains(@href, ':')]"/>  <!-- Ignore all non-local
links -->
+  <xsl:template match="menu[not(contains(@href, '.'))]">
     <section>
       <title><xsl:value-of select="@label"/></title>
       <xsl:apply-templates/>
@@ -65,7 +68,12 @@
     <xsl:value-of select="$node/@href"/>
   </xsl:template>
 
-  <xsl:template match="menu-item">
+  <!-- normally directories are menus and files are menu-items,
+      but if 'menu' contained a '.' (then it didn't match the main 'menu' template above),
+      and it's probably a file (because the children menu-items are #fragments)
+      so we match now like a menu-item
+  -->
+  <xsl:template match="menu-item|menu">
     <section class="page">
       <xsl:attribute name="id">
         <xsl:text></xsl:text><xsl:value-of select="@href"/>

Mime
View raw message