forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r566890 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
Date Fri, 17 Aug 2007 00:35:15 GMT
Author: rgardler
Date: Thu Aug 16 17:35:14 2007
New Revision: 566890

URL: http://svn.apache.org/viewvc?view=rev&rev=566890
Log:
- correct lists of multiple maintainers
- add programming language to JSON output

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

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl?view=diff&rev=566890&r1=566889&r2=566890
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
Thu Aug 16 17:35:14 2007
@@ -41,6 +41,7 @@
     "label":"<xsl:value-of select="doap:name"/>",
     <xsl:call-template name="categories"/>
     <xsl:call-template name="maintainers"/>
+    <xsl:call-template name="programming-language"/>
     <xsl:apply-templates select="doap:name|doap:shortdesc|doap:homepage"/>
   </xsl:template>
   
@@ -55,11 +56,11 @@
   </xsl:template>
   
   <xsl:template match="doap:maintainer|doap:developer|doap:helper">
-    <xsl:apply-templates select="foaf:Person"/><xsl:if test="not(position()=last())">,
</xsl:if>
+    <xsl:apply-templates select="foaf:Person"/>
   </xsl:template>
   
   <xsl:template match="foaf:Person">
-    "<xsl:value-of select="foaf:name"/>"
+    "<xsl:value-of select="foaf:name"/>"<xsl:if test="not(position()=last())">,</xsl:if>
   </xsl:template>
   
   <xsl:template name="categories">
@@ -85,6 +86,16 @@
             </xsl:choose>
           </xsl:otherwise>
         </xsl:choose>"<xsl:if test="not(position()=last())">, </xsl:if>
+  </xsl:template>
+  
+  <xsl:template name="programming-language">
+    <xsl:if test="doap:programming-language">
+      "programming-language" : [<xsl:apply-templates select="doap:programming-language"/>],
+    </xsl:if>
+  </xsl:template>
+  
+  <xsl:template match="doap:programming-language">
+    "<xsl:value-of select="."/>"<xsl:if test="not(position()=last())">, </xsl:if>
   </xsl:template>
   
   <xsl:template match="doap:*">



Mime
View raw message