forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r518097 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
Date Wed, 14 Mar 2007 11:04:34 GMT
Author: rgardler
Date: Wed Mar 14 04:04:33 2007
New Revision: 518097

URL: http://svn.apache.org/viewvc?view=rev&rev=518097
Log:
incomplete stylesheet for JSON output

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
  (with props)

Added: 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=auto&rev=518097
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
Wed Mar 14 04:04:33 2007
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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: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:template match="/">
+    {
+      "items" : [
+        <xsl:apply-templates/>
+      ]
+    } 
+  </xsl:template>
+  
+  <xsl:template match="descriptors">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="descriptor">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="doap:Project">
+    {
+      <xsl:apply-templates/>
+    },
+  </xsl:template>
+  
+  <xsl:template match="doap:shortdesc">    
+    shortdesc : <xsl:value-of select="."/>
+  </xsl:template>
+  
+  <xsl:template match="doap:name">    
+    name : <xsl:value-of select="."/>,
+  </xsl:template>
+  
+  <xsl:template match="doap:homepage">    
+    homepage : <xsl:value-of select="@rdf:resource"/>,
+  </xsl:template>
+</xsl:stylesheet>
+

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



Mime
View raw message