forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r522139 - /forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl
Date Sun, 25 Mar 2007 01:37:33 GMT
Author: rgardler
Date: Sat Mar 24 18:37:32 2007
New Revision: 522139

URL: http://svn.apache.org/viewvc?view=rev&rev=522139
Log:
Print a message if no plugins are available of a given type

Modified:
    forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl

Modified: forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl?view=diff&rev=522139&r1=522138&r2=522139
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl Sat Mar 24 18:37:32
2007
@@ -112,10 +112,17 @@
         Input plugins enable Forrest to work with
         source documents in different formats.
       </p>
-      <xsl:apply-templates
-        select="plugin[@type='input']">
-        <xsl:sort select="@name" />
-      </xsl:apply-templates>
+      <xsl:choose>
+        <xsl:when test="plugin[@type='input']">
+          <xsl:apply-templates
+            select="plugin[@type='input']">
+            <xsl:sort select="@name" />
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>No plugins of this type available.</p>
+        </xsl:otherwise>
+      </xsl:choose>
     </section>
 
     <section>
@@ -124,10 +131,17 @@
         Output plugins enable Forrest to produce
         documents in different formats.
       </p>
-      <xsl:apply-templates
-        select="plugin[@type='output']">
-        <xsl:sort select="@name" />
-      </xsl:apply-templates>
+      <xsl:choose>
+        <xsl:when test="plugin[@type='output']">
+          <xsl:apply-templates
+            select="plugin[@type='output']">
+            <xsl:sort select="@name" />
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>No plugins of this type available.</p>
+        </xsl:otherwise>
+      </xsl:choose>
     </section>
 
     <section>
@@ -136,10 +150,17 @@
         Internal plugins change the core behaviour
         of Forrest.
       </p>
-      <xsl:apply-templates
-        select="plugin[@type='internal']">
-        <xsl:sort select="@name" />
-      </xsl:apply-templates>
+      <xsl:choose>
+        <xsl:when test="plugin[@type='internal']">
+          <xsl:apply-templates
+            select="plugin[@type='internal']">
+            <xsl:sort select="@name" />
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>No plugins of this type available.</p>
+        </xsl:otherwise>
+      </xsl:choose>
     </section>
   </xsl:template>
 



Mime
View raw message