forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r327704 - in /forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets: descriptorIndex-to-siteSnippet.xsl locationmap-to-descriptorIndex.xsl
Date Sat, 22 Oct 2005 22:07:15 GMT
Author: rgardler
Date: Sat Oct 22 15:07:07 2005
New Revision: 327704

URL: http://svn.apache.org/viewcvs?rev=327704&view=rev
Log:
forgot to add stylesheets for creating indexes

Added:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-siteSnippet.xsl
  (with props)
    forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/locationmap-to-descriptorIndex.xsl
  (with props)

Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-siteSnippet.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-siteSnippet.xsl?rev=327704&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-siteSnippet.xsl
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-siteSnippet.xsl
Sat Oct 22 15:07:07 2005
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version = "1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:atom="http://www.w3.org/2005/Atom"
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+  xmlns:doap="http://usefulinc.com/ns/doap#">
+  
+  <xsl:param name="name">All</xsl:param>
+  <xsl:param name="progLanguage"/>
+  
+  <xsl:template match="descriptors">
+    <xsl:element name="{$name}">
+      <xsl:attribute name="label"><xsl:value-of select="$name"/></xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="$progLanguage">
+          <xsl:apply-templates select="descriptor[descendant::doap:Project[doap:programming-language
= $progLanguage]]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:element>
+  </xsl:template>
+  
+  <xsl:template match="descriptor">
+    <xsl:variable name="name">
+      <xsl:choose>
+        <xsl:when test="descendant::doap:Project/doap:shortname">
+          <xsl:value-of select="descendant::doap:Project/doap:shortname"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="descendant::doap:Project/doap:name"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+      
+    <project>
+      <xsl:attribute name="label"><xsl:value-of select="$name"/></xsl:attribute>
+      <xsl:attribute name="href"><xsl:value-of select="@href-noext"/>.html</xsl:attribute>
+      <xsl:attribute name="description">Project details for <xsl:value-of select="$name"/></xsl:attribute>
+    </project>
+  </xsl:template>
+</xsl:stylesheet>
+

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/descriptorIndex-to-siteSnippet.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/locationmap-to-descriptorIndex.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/locationmap-to-descriptorIndex.xsl?rev=327704&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/locationmap-to-descriptorIndex.xsl
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/locationmap-to-descriptorIndex.xsl
Sat Oct 22 15:07:07 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version = "1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:lm="http://apache.org/forrest/locationmap/1.0"
+  xmlns:cinclude="http://apache.org/cocoon/include/1.0">
+
+  <xsl:template match="lm:locationmap">
+    <descriptors>
+      <xsl:apply-templates/>
+    </descriptors>
+  </xsl:template>
+  
+  <xsl:template match="lm:locator/lm:match[starts-with(@pattern, 'project.descriptor')]">
+    <xsl:variable name="href-noext">
+      <xsl:choose>
+        <xsl:when test="@pattern = 'project.descriptor'">/projectDetails</xsl:when>
+        <xsl:otherwise>/projectDetails.<xsl:value-of select="substring-after(@pattern,
'project.descriptor.')"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <descriptor>
+      <xsl:attribute name="id"><xsl:value-of select="@pattern"/></xsl:attribute>
+      <xsl:attribute name="href-noext"><xsl:value-of select="$href-noext"/></xsl:attribute>
+      <cinclude:include>
+        <xsl:attribute name="src">cocoon:<xsl:value-of select="$href-noext"/>.source.xml</xsl:attribute>
+      </cinclude:include>
+    </descriptor>
+  </xsl:template>
+</xsl:stylesheet>
+

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/locationmap-to-descriptorIndex.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message