You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2007/07/14 04:11:43 UTC
svn commit: r556207 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap: ./
resources/stylesheets/ resources/themes/common/html/
src/documentation/content/xdocs/ src/documentation/resources/themes/
Author: rgardler
Date: Fri Jul 13 19:11:43 2007
New Revision: 556207
URL: http://svn.apache.org/viewvc?view=rev&rev=556207
Log:
Basic support of Exhibit browsing of the catalogue
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit.ft
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml (with props)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources.xmap
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-JSON.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/index.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources.xmap?view=diff&rev=556207&r1=556206&r2=556207
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources.xmap Fri Jul 13 19:11:43 2007
@@ -32,7 +32,7 @@
</map:components>
<map:pipelines>
<map:pipeline>
- <map:match pattern="projectDetails/allProjects.js">
+ <map:match pattern="projectDetails/allProjects.json">
<map:generate type="file" src="cocoon://projectDetails/descriptorIndex.xml" />
<map:transform src="{lm:doap.transform.descriptorIndex.JSON}"/>
<map:serialize type="js"/>
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=556207&r1=556206&r2=556207
==============================================================================
--- 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 Fri Jul 13 19:11:43 2007
@@ -21,18 +21,31 @@
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 match="/">{ "items": [<xsl:apply-templates select="descriptors"/>]}
</xsl:template>
- <xsl:template match="descriptors"><xsl:apply-templates/></xsl:template>
+ <xsl:template match="descriptors"><xsl:apply-templates select="descriptor"/></xsl:template>
- <xsl:template match="descriptor"><xsl:apply-templates/></xsl:template>
+ <xsl:template match="descriptor">
+ {<xsl:apply-templates select="doap:Project|rdf:RDF|atom:feed"/>
+ }<xsl:if test="not(position()=last())">, </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="atom:feed"><xsl:apply-templates select="atom:entry/atom:content/doap:Project"/></xsl:template>
- <xsl:template match="doap:Project">{<xsl:apply-templates/>},</xsl:template>
+ <xsl:template match="rdf:RDF"><xsl:apply-templates select="doap:Project"/></xsl:template>
- <xsl:template match="doap:shortdesc">shortdesc : <xsl:value-of select="."/></xsl:template>
+ <xsl:template match="doap:Project">
+ "label":"<xsl:value-of select="doap:name"/>",
+ <xsl:apply-templates select="doap:name|doap:shortdesc|doap:homepage"/>
+ </xsl:template>
- <xsl:template match="doap:name">name : <xsl:value-of select="."/>,</xsl:template>
+ <xsl:template match="doap:homepage">
+ "<xsl:value-of select="local-name(.)"/>":"<xsl:apply-templates select="@rdf:resource"/>"<xsl:if test="not(position()=last())">, </xsl:if>
+ </xsl:template>
- <xsl:template match="doap:homepage">homepage : <xsl:value-of select="@rdf:resource"/>,</xsl:template>
+ <xsl:template match="doap:*">
+ "<xsl:value-of select="local-name(.)"/>":"<xsl:value-of select="normalize-space(.)"/>"<xsl:if test="not(position()=last())">, </xsl:if>
+ </xsl:template>
+
</xsl:stylesheet>
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit.ft?view=auto&rev=556207
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit.ft Fri Jul 13 19:11:43 2007
@@ -0,0 +1,51 @@
+<?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.
+-->
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="doap-exhibit">
+ <description>
+ <p>
+ Embeds the necessary Exhibit scripts to enable the DOAP
+ catalogue to be browsed using Exhibit from MIT.
+ </p>
+ </description>
+ <usage>
+ <![CDATA[<forrest:contract name="doap-exhibit"/>]]>
+ </usage>
+ <forrest:template
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="doap-exhibit" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part xpath="/html/head">
+ <link href="/projectDetails/allProjects.json"
+ type="application/json" rel="exhibit/data" />
+ <script
+ src="http://static.simile.mit.edu/exhibit/api/exhibit-api.js"
+ type="text/javascript">
+ <!-- This empty statement is required due to a bug relating to empty script tags in Firefox -->;
+ </script>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml?view=auto&rev=556207
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml Fri Jul 13 19:11:43 2007
@@ -0,0 +1,39 @@
+<?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.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>Exhibit Sample</title>
+ </header>
+ <body>
+ <section>
+ <title>Exhibit Sample</title>
+ <table width="100%">
+ <tr valign="top">
+ <td>
+ <div id="exhibit-control-panel"></div>
+ <div id="exhibit-view-panel"></div>
+ </td>
+ <td width="25%">
+ <div id="exhibit-browse-panel"></div>
+ </td>
+ </tr>
+ </table>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/index.xml?view=diff&rev=556207&r1=556206&r2=556207
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/index.xml Fri Jul 13 19:11:43 2007
@@ -162,6 +162,15 @@
<li><a href="projectDetails/contacts.csv">Comma separated list of project contacts who have a recorded email address</a></li>
</ul>
+ <section>
+ <title>In Development Features</title>
+
+ <ul>
+ <li><a href="projectDetails/allProjects.json">JSON file for all projects</a></li>
+ <li><a href="exhibitTest.html">Browse the catalogue using Exhibit from MIT</a></li>
+ </ul>
+ </section>
+
<note>
The more samples included here the easier it is for users to understand
this plugin. If you can provide additional samples please do so.
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv?view=diff&rev=556207&r1=556206&r2=556207
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv Fri Jul 13 19:11:43 2007
@@ -29,6 +29,7 @@
<jx:import uri="cocoon://prepare.panels.pelt-css"/>
</forrest:view>
<forrest:view type="html" hooksXpath="/html/body">
+ <forrest:contract name="doap-exhibit"/>
<forrest:contract name="doap-embedded">
<forrest:property name="doap-embedded-links">
<doap url="/projectDetails/source.xml"/>