forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r600694 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
Date Mon, 03 Dec 2007 21:32:37 GMT
Author: rgardler
Date: Mon Dec  3 13:32:35 2007
New Revision: 600694

URL: http://svn.apache.org/viewvc?rev=600694&view=rev
Log:
- Support multiple mailing-list properties
- Support dc:title in mailing list element

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

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl?rev=600694&r1=600693&r2=600694&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/doap-to-document.xsl
Mon Dec  3 13:32:35 2007
@@ -149,12 +149,25 @@
        </xsl:if>
     </body>
   </xsl:template>
-  <xsl:template match="@rdf:resource"><a>
-    <xsl:attribute name="href">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-    <xsl:value-of select="."/></a>
+  
+  <xsl:template match="@rdf:resource">
+    <a>
+      <xsl:attribute name="href">
+        <xsl:value-of select="."/>
+      </xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="../@dc:title">
+          <xsl:value-of select="../@dc:title"/>
+        </xsl:when>    
+        <xsl:otherwise>
+    	  <xsl:value-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </a>
   </xsl:template>
+  
+  <xsl:template match="@dc:title"/>
+  
   <xsl:template match="doap:programming-language"><a>
     <xsl:attribute name="href">/projectDetails/index/byLang/<xsl:value-of select="."/>.html</xsl:attribute>
     <xsl:value-of select="."/></a>
@@ -272,11 +285,13 @@
             <td class="right">
               <xsl:choose>
                 <xsl:when test="doap:mailing-list/@*">
-                  <xsl:apply-templates select="doap:mailing-list/@*" />
+                  <ul>
+                    <xsl:apply-templates select="doap:mailing-list" />
+                  </ul>
                 </xsl:when>
                 <xsl:otherwise>
-                       None Defined
-                     </xsl:otherwise>
+                  None Defined
+                </xsl:otherwise>
               </xsl:choose>
             </td>
           </tr>
@@ -585,6 +600,10 @@
         </xsl:if>
       </section>
     </xsl:if>
+  </xsl:template>
+  
+  <xsl:template match="doap:mailing-list">
+    <li><xsl:apply-templates select="@rdf:resource" /></li>
   </xsl:template>
   
   <xsl:template match="foaf:name">



Mime
View raw message