forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r561577 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-indexByCategory.xsl
Date Tue, 31 Jul 2007 22:31:09 GMT
Author: rgardler
Date: Tue Jul 31 15:31:06 2007
New Revision: 561577

URL: http://svn.apache.org/viewvc?view=rev&rev=561577
Log:
Use names for categories where available

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-indexByCategory.xsl

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-indexByCategory.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-indexByCategory.xsl?view=diff&rev=561577&r1=561576&r2=561577
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-indexByCategory.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-indexByCategory.xsl
Tue Jul 31 15:31:06 2007
@@ -20,7 +20,8 @@
   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#">
+  xmlns:doap="http://usefulinc.com/ns/doap#"
+  xmlns:dc="http://purl.org/dc/elements/1.1/">
   <xsl:include href="descriptorIndex-to-indexByCommon.xsl"/>
   <xsl:key name="kDistinctCategory" match="doap:category" use="@rdf:resource"/>
   <xsl:param name="filter"/>
@@ -42,7 +43,23 @@
               <xsl:sort select="@rdf:resource"/>
               <xsl:variable name="category" select="@rdf:resource"/>
               <section>
-                <title><xsl:value-of select="$category"/></title>
+                <title>
+                    <xsl:choose>
+                      <xsl:when test="//projectDetails/categories/doap:category[@rdf:resource
= $category]/@dc:title">
+                        <xsl:value-of select="//projectDetails/categories/doap:category[@rdf:resource
= $category]/@dc:title"/>
+                      </xsl:when>
+                      <xsl:otherwise>
+                        <xsl:choose>
+                          <xsl:when test="@dc:title">
+                            <xsl:value-of select="@dc:title"/>
+                          </xsl:when>
+                          <xsl:otherwise>
+                            <xsl:value-of select="@rdf:resource"/>
+                          </xsl:otherwise>
+                        </xsl:choose>
+                      </xsl:otherwise>
+                    </xsl:choose>
+                </title>
                 <xsl:apply-templates select="//descriptor[descendant::doap:category[@rdf:resource
= $category]]"/>
               </section>
             </xsl:for-each>



Mime
View raw message