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="[EMAIL PROTECTED]'input']">
- <xsl:sort select="@name" />
- </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'input']">
+ <xsl:apply-templates
+ select="[EMAIL PROTECTED]'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="[EMAIL PROTECTED]'output']">
- <xsl:sort select="@name" />
- </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'output']">
+ <xsl:apply-templates
+ select="[EMAIL PROTECTED]'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="[EMAIL PROTECTED]'internal']">
- <xsl:sort select="@name" />
- </xsl:apply-templates>
+ <xsl:choose>
+ <xsl:when test="[EMAIL PROTECTED]'internal']">
+ <xsl:apply-templates
+ select="[EMAIL PROTECTED]'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>