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/03/27 01:18:18 UTC

svn commit: r159126 - in forrest/trunk/plugins/org.apache.forrest.plugin.views: output.xmap resources/stylesheets/ls.contracts.html.xsl resources/stylesheets/ls.contracts.xsl

Author: thorsten
Date: Sat Mar 26 16:18:16 2005
New Revision: 159126

URL: http://svn.apache.org/viewcvs?view=rev&rev=159126
Log:
added the ls pipe that list the contracts we have in the plugin. Besides that I added ls.l wich will output further description of ls. ;-)

Added:
    forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.html.xsl   (with props)
    forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.xsl   (with props)
Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap?view=diff&r1=159125&r2=159126
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap Sat Mar 26 16:18:16 2005
@@ -115,7 +115,34 @@
      <map:transform src="resources/stylesheets/contract.property.xsl"/>
      <map:serialize type="xml"/>
    </map:match>
-   
+<!-- ls.fbits 
+  list the default fbits-->
+  <map:pipeline>
+    <map:match pattern="ls.contracts">
+		  <map:generate type="directory" src="resources/templates">
+        <map:parameter name="depth" value="1"/>
+        <!-- sorted alphabetically -->
+      	<map:parameter name="reverse" value="false"/>
+      </map:generate>
+      <map:serialize type="xml"/>
+    </map:match>
+  </map:pipeline>
+
+<!--ls.fbits.l
+transform this dir-list and add more information 
+-->
+  <map:pipeline>
+    <map:match pattern="ls.contracts.l">
+		  <map:generate src="cocoon:/ls.contracts"/>
+      <map:transform src="resources/stylesheets/ls.contracts.xsl">
+        <map:parameter name="contentDir" value="{forrest:plugins}/org.apache.forrest.plugin.views"/>
+      </map:transform>
+      <map:transform src="resources/stylesheets/ls.contracts.html.xsl"/>
+      <map:serialize type="xhtml"/>
+    </map:match>
+  </map:pipeline>
+
+
    <!--
     Get some util-templates from the common skin.
     -->

Added: forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.html.xsl?view=auto&rev=159126
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.html.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.html.xsl Sat Mar 26 16:18:16 2005
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  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:xhtml="http://www.w3.org/1999/xhtml"
+    xmlns:dir="http://apache.org/cocoon/directory/2.0"
+    xmlns:session="http://apache.org/cocoon/session/1.0"
+    xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    >
+
+  <!--
+      Create row for each document.  Information about the document is
+      extracted from the document itself using the document()
+      function.
+  -->
+  <xsl:template match="/">
+    <xhtml>
+      <head>
+        <title>ls.contracts.l</title>
+      </head>
+      <body>
+        <xsl:apply-templates/>
+      </body>
+    </xhtml>
+  </xsl:template>
+<xsl:template match="forrest:contracts">
+  <h1>ls.contracts.l</h1>
+  <xsl:apply-templates/>
+</xsl:template>
+<xsl:template match="forrest:contract">
+  <h2><xsl:value-of select="@name" /></h2>
+<p><b>file-name:</b> <br/><xsl:value-of select="@file-name" /></p>
+<p><b>description:</b> <br/><xsl:value-of select="./description" /></p>
+<p><b>realpath:</b> <br/><xsl:value-of select="./realpath" /></p>
+</xsl:template>
+
+</xsl:stylesheet>
+

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.html.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.xsl?view=auto&rev=159126
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.xsl Sat Mar 26 16:18:16 2005
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  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:xhtml="http://www.w3.org/1999/xhtml"
+    xmlns:dir="http://apache.org/cocoon/directory/2.0"
+    xmlns:session="http://apache.org/cocoon/session/1.0"
+    xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    >
+
+<xsl:param name="contentDir" select="'default/path'"/>
+
+  <!--
+      Create row for each document.  Information about the document is
+      extracted from the document itself using the document()
+      function.
+  -->
+  <xsl:template match="/">
+      <forrest:contracts xmlns:forrest="http://apache.org/forrest/templates/1.0">
+        <xsl:apply-templates select="//dir:file"/>                    
+      </forrest:contracts>
+  </xsl:template>
+
+<xsl:template match="dir:file">
+  <xsl:variable name="fct-bit-file">
+    <xsl:value-of select="$contentDir"/>
+    <xsl:text>/resources/templates/</xsl:text>
+    <xsl:value-of select="@name"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-title">
+    <xsl:value-of select="document($fct-bit-file)//forrest:contract/@name"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-type">
+    <xsl:value-of select="document($fct-bit-file)/forrest:contract/@type"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-description">
+    <xsl:value-of select="document($fct-bit-file)/forrest:contract/description"/>
+  </xsl:variable>
+
+    <forrest:contract name="{$fct-bit-title}" css="{$fct-bit-type}" file-name="{@name}">
+      <description>
+        <xsl:value-of select="$fct-bit-description"/>
+      </description>
+      <realpath>  
+        <xsl:value-of select="$fct-bit-file"/>
+      </realpath>
+    </forrest:contract>
+
+</xsl:template>
+
+</xsl:stylesheet>
+

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/ls.contracts.xsl
------------------------------------------------------------------------------
    svn:eol-style = native