You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2005/10/24 10:50:17 UTC
svn commit: r327997 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets:
ls.contracts-to-document.xsl ls.contracts.xsl themer.html.xsl
Author: thorsten
Date: Mon Oct 24 01:49:26 2005
New Revision: 327997
URL: http://svn.apache.org/viewcvs?rev=327997&view=rev
Log:
Added support for project contract listing. Updated code to the new theme location.
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts-to-document.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/themer.html.xsl
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts-to-document.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts-to-document.xsl?rev=327997&r1=327996&r2=327997&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts-to-document.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts-to-document.xsl Mon Oct 24 01:49:26 2005
@@ -68,61 +68,46 @@
<xsl:choose>
<xsl:when test="$requestedContract!='false'">
<section id="{@name}">
- <title>
- <xsl:value-of select="@name" />
- </title>
- <p class="file">
- <strong>file-name:</strong>
- <br/>
- <xsl:value-of select="@file-name" />
- </p>
- <p class="description">
- <strong>description:</strong>
- <br/>
- <xsl:copy-of select="./description/*" />
- </p>
- <p class="usage">
- <strong>usage:</strong>
- </p>
- <source>
- <xsl:value-of select="./usage" />
- </source>
- <p class="template-definition">
- <strong>forrest-template definition:</strong>
- </p>
- <source><forrest:template<xsl:apply-templates
- select="./forrest:template/@*" />/> </source>
+ <xsl:call-template name="innerBodyLs"/>
</section>
</xsl:when>
<xsl:otherwise>
<section id="{$theme}-{@name}">
- <title>
- <xsl:value-of select="@name" />
- </title>
- <p class="file">
- <strong>file-name:</strong>
- <br/>
- <xsl:value-of select="@file-name" />
- </p>
- <p class="description">
- <strong>description:</strong>
- <br/>
- <xsl:copy-of select="./description/*" />
- </p>
- <p class="usage">
- <strong>usage:</strong>
- </p>
- <source>
- <xsl:value-of select="./usage" />
- </source>
- <p class="template-definition">
- <strong>forrest-template definition:</strong>
- </p>
- <source><forrest:template<xsl:apply-templates
- select="./forrest:template/@*" />/> </source>
+ <xsl:call-template name="innerBodyLs"/>
</section>
</xsl:otherwise>
</xsl:choose>
+ </xsl:template>
+ <xsl:template name="innerBodyLs">
+ <title>
+ <xsl:value-of select="@name" />
+ </title>
+ <p class="file">
+ <strong>file-name:</strong>
+ <br/>
+ <xsl:value-of select="@file-name" />
+ </p>
+ <p class="description">
+ <strong>description:</strong>
+ <br/>
+ <xsl:if test="./description/*">
+ <xsl:copy-of select="./description/*" />
+ </xsl:if>
+ <xsl:if test="not(./description/*)">
+ <xsl:value-of select="./description" />
+ </xsl:if>
+ </p>
+ <p class="usage">
+ <strong>usage:</strong>
+ </p>
+ <source>
+ <xsl:value-of select="./usage" />
+ </source>
+ <p class="template-definition">
+ <strong>forrest-template definition:</strong>
+ </p>
+ <source><forrest:template<xsl:apply-templates
+ select="./forrest:template/@*" />/> </source>
</xsl:template>
<xsl:template match="forrest:template/@*"> <xsl:value-of
select="name()"/>="<xsl:value-of select="."/>"</xsl:template>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts.xsl?rev=327997&r1=327996&r2=327997&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ls.contracts.xsl Mon Oct 24 01:49:26 2005
@@ -15,39 +15,29 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dir="http://apache.org/cocoon/directory/2.0"
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- >
-
-
- <xsl:template match="/dir:directory">
- <forrest:themes xmlns:forrest="http://apache.org/forrest/templates/1.0">
- <xsl:apply-templates />
- </forrest:themes>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:dir="http://apache.org/cocoon/directory/2.0"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0" >
+ <xsl:template match="/">
+ <forrest:themes xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <xsl:apply-templates select="dir:directory/dir:directory"/>
+ </forrest:themes>
</xsl:template>
-
-<xsl:template match="dir:directory">
- <forrest:theme name="{@name}">
- <xsl:apply-templates />
- </forrest:theme>
-</xsl:template>
-
-<xsl:template match="dir:file[./*/*/@name]">
- <forrest:contract name="{./*/*/@name}" file-name="{@name}">
- <xsl:copy-of select="./*/*/description"/>
- <xsl:copy-of select="./*/*/usage"/>
- <xsl:apply-templates select=".//forrest:template"/>
- </forrest:contract>
-</xsl:template>
-
-<xsl:template match="forrest:template">
- <forrest:template>
- <xsl:copy-of select="@*"/>
- </forrest:template>
-</xsl:template>
-
-</xsl:stylesheet>
-
+ <xsl:template match="dir:directory">
+ <forrest:theme name="{@name}">
+ <xsl:apply-templates select="descendant::dir:file" />
+ </forrest:theme>
+ </xsl:template>
+ <xsl:template match="dir:file[./*/*/@name]">
+ <forrest:contract name="{./*/*/@name}" file-name="{@name}">
+ <xsl:copy-of select="./*/*/description"/>
+ <xsl:copy-of select="./*/*/usage"/>
+ <xsl:apply-templates select=".//forrest:template"/>
+ </forrest:contract>
+ </xsl:template>
+ <xsl:template match="forrest:template">
+ <forrest:template>
+ <xsl:copy-of select="@*"/>
+ </forrest:template>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/themer.html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/themer.html.xsl?rev=327997&r1=327996&r2=327997&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/themer.html.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/themer.html.xsl Mon Oct 24 01:49:26 2005
@@ -67,7 +67,7 @@
<!--*No* forrest:css found in the view-->
<xsl:if test="not(/*/forrest:view/forrest:css)">
<link rel="stylesheet" type="text/css">
- <xsl:attribute name="href">{$root}skin/default.css</xsl:attribute>
+ <xsl:attribute name="href">{$root}themes/default.css</xsl:attribute>
</link>
</xsl:if>
<!-- forrest:css *found* in the view-->
@@ -104,7 +104,7 @@
<xsl:attribute name="title"><xsl:value-of select="@url"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- <xsl:attribute name="href">{$root}skin/<xsl:value-of select="@url"/>
+ <xsl:attribute name="href">{$root}themes/<xsl:value-of select="@url"/>
</xsl:attribute>
<xsl:if test="@media">
<xsl:attribute name="media"><xsl:value-of select="@media"/></xsl:attribute>