Author: rgardler
Date: Fri Jun 8 03:58:50 2007
New Revision: 545476
URL: http://svn.apache.org/viewvc?view=rev&rev=545476
Log:
- add generation of a CSV file of contacts
- add samples for getting source files
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-contactsCSV.xsl
(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/src/documentation/content/xdocs/index.xml
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=545476&r1=545475&r2=545476
==============================================================================
---
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 Jun 8 03:58:50 2007
@@ -23,6 +23,11 @@
mime-type="application/javascript"
logger="sitemap.serializer.text"
/>
+ <map:serializer name="csv" mime-type="application/x-csv"
+ src="org.apache.cocoon.serialization.TextSerializer">
+ <encoding>UTF-8</encoding>
+ <omit-xml-declaration>yes</omit-xml-declaration>
+ </map:serializer>
</map:serializers>
</map:components>
<map:pipelines>
@@ -32,9 +37,16 @@
<map:transform src="{lm:doap.transform.descriptorIndex.JSON}"/>
<map:serialize type="js"/>
</map:match>
+
<map:match pattern="projectDetails/**.rdf">
<map:generate src="cocoon://projectDetails/{1}.source.xml" />
<map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="projectDetails/contacts.csv">
+ <map:generate type="file"
src="cocoon://projectDetails/descriptorIndex.xml" />
+ <map:transform src="{lm:doap.transform.descriptorIndex.contactsCSV}"/>
+ <map:serialize type="csv"/>
</map:match>
</map:pipeline>
</map:pipelines>
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-contactsCSV.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-contactsCSV.xsl?view=auto&rev=545476
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-contactsCSV.xsl
(added)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-contactsCSV.xsl
Fri Jun 8 03:58:50 2007
@@ -0,0 +1,54 @@
+<?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#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/">
+
+ <xsl:output method="text" indent="no" />
+
+ <xsl:template match="/">
+ <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:maintainer">
+ <xsl:if test="foaf:Person/foaf:mbox/@rdf:resource">
+ <xsl:value-of select="normalize-space(../doap:name)"
/>,<xsl:apply-templates />
+<xsl:text>
+
+</xsl:text>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template match="foaf:Person">
+ <xsl:value-of select="normalize-space(foaf:name)" />,<xsl:value-of
select="normalize-space(foaf:mbox/@rdf:resource)" />
+ </xsl:template>
+
+ <xsl:template
+ match="@*|text()|*|processing-instruction()|comment()" />
+</xsl:stylesheet>
Propchange:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/stylesheets/descriptorIndex-to-contactsCSV.xsl
------------------------------------------------------------------------------
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=545476&r1=545475&r2=545476
==============================================================================
---
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 Jun 8 03:58:50 2007
@@ -24,7 +24,9 @@
<section id="overview">
<title>Apache Forrest - org.apache.forrest.plugin.input.doap
Plugin</title>
<p>
- Renders DOAP files in a human readable form.
+ Renders DOAP files in a human readable form, provides various indexes
of
+ DOAP collections and allows the extraction of contact details from a
set
+ of DOAP files.
</p>
</section>
<section>
@@ -126,6 +128,12 @@
</warning>
</section>
<section>
+ <title>Contact Lists</title>
+ <p>You can extract a comma separated list of contact details contained
+ in the collection of DOAP files by requesting
+ <a
href="projectDetails/contacts.csv">projectDetails/contacts.csv</a>.</p>
+ </section>
+ <section>
<title>Dispatcher</title>
<p>
The DOAP plugin provides dispatcher templates for working with DOAP
@@ -133,7 +141,6 @@
<a
href="/ls.contracts.org.apache.forrest.plugin.input.doap.html">doap
templates</a>.
</p>
- </section>
</section>
<section id="samples">
<title>Samples</title>
@@ -144,11 +151,14 @@
</p>
<ul>
+ <li><a href="projectDetails/projectDetails.source.xml">Source XML
file</a></li>
+ <li><a href="projectDetails/projectDetails.source.rdf">Source RDF file
(if the source file is an RDF/XML file this will be the same as the previous
example - currently only RDF/XML is supported)</a></li>
<li><a href="projectDetails/projectDetails.html">Descriptor page for
this plugin</a></li>
<li><a href="projectDetails/forrest.html">Descriptor page for
Forrest</a></li>
<li><a href="projectDetails/index/byLang.html">Index by
language</a></li>
<li><a href="projectDetails/index/byLang/Java.html">Index by specific
language (Java)</a></li>
<li><a href="projectDetails/index/byCategory.html">Index by
category</a></li>
+ <li><a href="projectDetails/contacts.csv">Comma separated list of
project contacts who have a recorded email address</a></li>
</ul>
<note>