You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by gm...@apache.org on 2007/08/10 14:58:16 UTC
svn commit: r564578 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf: ./
resources/stylesheets/ src/documentation/content/
src/documentation/content/xdocs/
Author: gmcdonald
Date: Fri Aug 10 05:58:14 2007
New Revision: 564578
URL: http://svn.apache.org/viewvc?view=rev&rev=564578
Log:
More foaf improvments and validations by Oshani - FOR-1008
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/foaf.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/input.xmap
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/locationmap.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/locationmap-to-descriptorIndex.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/locationmap.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/index.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/site.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/status.xml
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/foaf.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/foaf.xml?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/foaf.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/foaf.xml Fri Aug 10 05:58:14 2007
@@ -21,16 +21,14 @@
xmlns:foaf="http://xmlns.com/foaf/0.1/"
>
-<foaf:Person rdf:ID="oshani">
+<foaf:Person>
<foaf:name>Oshani Seneviratne</foaf:name>
<foaf:title>Miss</foaf:title>
<foaf:givenname>Oshani</foaf:givenname>
<foaf:family_name>Seneviratne</foaf:family_name>
<foaf:nick>oshi</foaf:nick>
<foaf:mbox_sha1sum>4e544fceadd5ad8e14579af4f661dca9e8c9727d</foaf:mbox_sha1sum>
- <foaf:depiction rdf:resource="http://people.apache.org/~oshani/images/oshani.jpg"/>
- <foaf:phone rdf:resource="tel:+94-72-2797725"/>
- <foaf:schoolHomepage rdf:resource="www.cse.mrt.ac.lk"/>
+ <foaf:schoolHomepage rdf:resource="http://www.cse.mrt.ac.lk"/>
<foaf:knows>
<foaf:Person>
<foaf:name>Sarangi Dissanayake</foaf:name>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/input.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/input.xmap?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/input.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/input.xmap Fri Aug 10 05:58:14 2007
@@ -62,10 +62,29 @@
<map:transform src="{lm:foaf.transform.foaf.document}"/>
<map:serialize type="xml-document"/>
</map:match>
+ <map:match pattern="people/person-*/source.xml">
+ <map:generate type="file" src="{lm:foaf.descriptor.{1}}" />
+ <map:serialize type="xml"/>
+ </map:match>
+ <map:match pattern="people/person-*.xml">
+ <map:generate src="cocoon:/people/person-{1}/source.xml" />
+ <map:transform src="{lm:foaf.transform.foaf.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+ <map:match pattern="people/index/source.xml">
+ <map:generate type="file" src="{lm:multiple.foaf.descriptors}" />
+ <map:serialize type="xml"/>
+ </map:match>
+ <map:match pattern="people/index.xml">
+ <map:generate type="file" src="cocoon:/people/index/source.xml" />
+ <map:transform src="{lm:foaf.transform.foafs.index}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
<map:match pattern="personDetails/**.xml">
<map:generate src="cocoon:/personDetails/{1}.source.xml" />
<map:transform src="{lm:foaf.transform.foaf.document}"/>
<map:serialize type="xml-document"/>
+
</map:match>
</map:pipeline>
</map:pipelines>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/locationmap.xml?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/locationmap.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/locationmap.xml Fri Aug 10 05:58:14 2007
@@ -29,28 +29,16 @@
</components>
<locator>
<match pattern="foaf.descriptor">
- <location src="foaf.xml" />
+ <location src="foaf.rdf" />
</match>
- <match pattern="foaf.transform.*.*">
- <location src="resources/stylesheets/{1}-to-{2}.xsl"/>
- </match>
- <match pattern="resolvePluginContract.*.**">
- <select type="exists">
- <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.foaf/resources/themes/{properties:dispatcher.theme}/{1}/{2}.ft" />
- <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.foaf/resources/themes/{properties:dispatcher.fallback.theme}/{1}/{2}.ft" />
- </select>
+ <match pattern="multiple.foaf.descriptors">
+ <location src="files.xml" />
</match>
- <match pattern="resolvePluginThemes.*.**">
- <select type="exists">
- <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.foaf/resources/themes/{properties:dispatcher.theme}/{1}/{2}.{1}" />
- <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.foaf/resources/themes/{properties:dispatcher.fallback.theme}/{1}/{2}.{1}" />
- </select>
+ <match pattern="foaf.descriptor.*">
+ <location src="foaf-{1}.rdf" />
</match>
- <match pattern="resolvePluginPanels.**">
- <select type="exists">
- <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.foaf/resources/themes/{properties:dispatcher.theme}/panels/{1}.panel.xml" />
- <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.foaf/resources/themes/{properties:dispatcher.fallback.theme}/panels/{1}.panel.xml" />
- </select>
+ <match pattern="foaf.transform.*.*">
+ <location src="resources/stylesheets/{1}-to-{2}.xsl"/>
</match>
- </locator>
+ </locator>
</locationmap>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl Fri Aug 10 05:58:14 2007
@@ -19,7 +19,6 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
- xmlns="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
exclude-result-prefixes="rdf dc foaf">
@@ -41,22 +40,19 @@
</header>
</xsl:template>
-
-
<xsl:template name="body">
<body>
<section>
- <div class="content">
-
- <h1>FOAF Metadata of <xsl:value-of select="foaf:name"/> </h1>
- <p><img src="{./foaf:depiction/@rdf:resource}" alt="Photograph" height="120" border="0" /></p>
+ <title>FOAF Metadata of <xsl:value-of select="foaf:name"/> </title>
+ <xsl:choose>
+ <xsl:when test="foaf:depiction/@rdf:resource">
+ <p><img src="{foaf:depiction/@rdf:resource}" height="120" border="0" /></p>
+ </xsl:when>
+ </xsl:choose>
<p>
<table>
- <thead align="left">
<tr><th>Property</th><th>Value</th></tr>
- </thead>
- <tbody>
- <tr><td>Name</td><td>
+ <tr><td>Name</td><td>
<xsl:choose >
<xsl:when test="foaf:name">
<xsl:value-of select="foaf:name"/>
@@ -65,8 +61,16 @@
<xsl:value-of select="foaf:firstName"/> <xsl:text> </xsl:text><xsl:value-of select="foaf:surname"/>
</xsl:otherwise>
</xsl:choose></td></tr>
- <tr><td>Id</td><td><a href="{./@rdf:ID}"><xsl:value-of select="./@rdf:ID"/></a></td></tr>
- <tr><td>Nick</td><td><xsl:value-of select="foaf:nick"/></td></tr>
+ <xsl:choose>
+ <xsl:when test="./@rdf:ID">
+ <tr><td>Id</td><td><a href="{./@rdf:ID}"><xsl:value-of select="./@rdf:ID"/></a></td></tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="foaf:nick">
+ <tr><td>Nick</td><td><xsl:value-of select="foaf:nick"/></td></tr>
+ </xsl:when>
+ </xsl:choose>
<tr><td>Mbox</td>
<xsl:choose>
<xsl:when test="foaf:mbox_sha1sum">
@@ -77,36 +81,43 @@
</xsl:otherwise>
</xsl:choose>
</tr>
- <tr><td>Phone</td><td><a href="{foaf:phone/@rdf:resource}"><xsl:value-of select="foaf:phone/@rdf:resource"/></a></td></tr>
- <tr><td>Homepage</td><td><a href="{foaf:homepage/@rdf:resource}"><xsl:value-of select="foaf:homepage/@rdf:resource"/></a></td></tr>
- <tr><td>Work Place Homepage</td><td><a href="{foaf:workplaceHomepage/@rdf:resource}"><xsl:value-of select="foaf:workplaceHomepage/@rdf:resource"/></a></td></tr>
- <tr><td>School Homepage</td><td><a href="{foaf:schoolHomepage/@rdf:resource}"><xsl:value-of select="foaf:schoolHomepage/@rdf:resource"/></a></td></tr>
- </tbody>
+ <xsl:choose>
+ <xsl:when test="foaf:phone/@rdf:resource">
+ <tr><td>Phone</td><td><a href="{foaf:phone/@rdf:resource}"><xsl:value-of select="foaf:phone/@rdf:resource"/></a></td></tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="foaf:homepage/@rdf:resource">
+ <tr><td>Homepage</td><td><a href="{foaf:homepage/@rdf:resource}"><xsl:value-of select="foaf:homepage/@rdf:resource"/></a></td></tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="foaf:workplaceHomepage/@rdf:resource">
+ <tr><td>Work Place Homepage</td><td><a href="{foaf:workplaceHomepage/@rdf:resource}"><xsl:value-of select="foaf:workplaceHomepage/@rdf:resource"/></a></td></tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="foaf:schoolHomepage/@rdf:resource">
+ <tr><td>School Homepage</td><td><a href="{foaf:schoolHomepage/@rdf:resource}"><xsl:value-of select="foaf:schoolHomepage/@rdf:resource"/></a></td></tr>
+ </xsl:when>
+ </xsl:choose>
</table>
-
</p>
+ </section>
- <br /><br /><br />
-
- <h2>Knows</h2>
+ <br/>
+
+ <section>
+ <title>Friends</title>
<p>
- <table border="1">
- <thead align="left">
- <tr><th>ID</th><th>Name</th><th>Project Page</th><th>Mail</th><th>Link to FOAF</th></tr>
- </thead>
- <tbody>
+ <table>
+ <tr><th>ID</th><th>Name</th><th>Mail</th></tr>
<xsl:apply-templates select="foaf:knows"/>
- </tbody>
- </table>
+ </table>
</p>
+ </section>
- <br /><br /><br />
-
- <p>
- </p>
- </div>
- </section>
- </body>
+ </body>
</xsl:template>
<xsl:template match="foaf:*">
@@ -147,7 +158,6 @@
</xsl:otherwise>
</xsl:choose>
</td>
- <td><a href="{foaf:id/@rdf:resource}"><xsl:value-of select="foaf:id/@rdf:resource" /></a></td>
<td>
<xsl:choose>
<xsl:when test="foaf:mbox_sha1sum">
@@ -158,8 +168,6 @@
</xsl:otherwise>
</xsl:choose>
</td>
- <td><a href="rdfs:seeAlso/@rdf:resource"><xsl:value-of select="rdfs:seeAlso/@rdf:resource" /></a></td>
-
</tr>
</xsl:for-each>
</xsl:template>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/locationmap-to-descriptorIndex.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/locationmap-to-descriptorIndex.xsl?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/locationmap-to-descriptorIndex.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/locationmap-to-descriptorIndex.xsl Fri Aug 10 05:58:14 2007
@@ -27,18 +27,18 @@
<xsl:template match="lm:locator/lm:match[starts-with(@pattern, 'foaf.descriptor')]">
<xsl:variable name="href-noext">
<xsl:choose>
- <xsl:when test="@pattern = 'foaf.descriptor'">/projectDetails</xsl:when>
+ <xsl:when test="@pattern = 'foaf.descriptor'">/personDetails</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after(@pattern, 'foaf.descriptor.')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <descriptor href-noext="/projectDetails/{$href-noext}">
+ <descriptor href-noext="/personDetails/{$href-noext}">
<xsl:attribute name="id">
<xsl:value-of select="@pattern"/>
</xsl:attribute>
<cinclude:include>
- <xsl:attribute name="src">cocoon:/projectDetails/<xsl:value-of select="$href-noext"/>.source.xml</xsl:attribute>
+ <xsl:attribute name="src">cocoon:/personDetails/<xsl:value-of select="$href-noext"/>.source.xml</xsl:attribute>
</cinclude:include>
</descriptor>
</xsl:template>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/locationmap.xml?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/locationmap.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/locationmap.xml Fri Aug 10 05:58:14 2007
@@ -35,4 +35,4 @@
<location src="resources/stylesheets/{1}-to-{2}.xsl"/>
</match>
</locator>
-</locationmap>
\ No newline at end of file
+</locationmap>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/index.xml?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/index.xml Fri Aug 10 05:58:14 2007
@@ -17,37 +17,31 @@
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
- <header>
- <title>Welcome to the org.apache.forrest.plugin.input.foaf Plugin</title>
- </header>
- <body>
- <section id="overview">
- <title>Apache Forrest - org.apache.forrest.plugin.input.foaf Plugin</title>
- <p>
- Renders a FOAF document into human readable form.
- </p>
- </section>
- <section id="samples">
- <title>Samples</title>
- <p>
- This section includes links to a number of samples using this plugin.
- The plugin is intended to be self documenting through these samples. If
- you require further help please ask on the user mailing list.
- </p>
- <ul>
- <li>Sample-1</li>
- <li>
- <ul>
- <li><a href="personDetails/source.xml">Raw FOAF file</a></li>
- <li><a href="personDetails.xml">FOAF --> XML Doc</a></li>
- <li><a href="personDetails.html">The elusive HTML page</a></li>
- </ul>
- </li>
- </ul>
- <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.
- </note>
- </section>
- </body>
+ <header>
+ <title>Welcome to the org.apache.forrest.plugin.input.foaf Plugin</title>
+ </header>
+ <body>
+ <section id="overview">
+ <title>Apache Forrest - FOAF Plugin</title>
+ <p>Renders a FOAF document into human readable form.</p>
+ </section>
+ <section id="samples">
+ <title>Samples</title>
+ <note>This plugin is in an early development stage.</note>
+ <p>This section includes links to a number of samples using this plugin.
+ The plugin is intended to be self documenting through these samples.
+ If you require further help please ask on the user mailing list.
+ </p>
+ <section id="sample-1">
+ <title>Sample FOAF data</title>
+ <p>Details of the default FOAF file for the web site.</p>
+ <ul>
+ <li><a href="personDetails.html">HTML</a></li>
+ <li><a href="personDetails.pdf">PDF</a></li>
+ <li><a href="personDetails/source.xml">FOAF</a></li>
+ <li><a href="personDetails.xml">XDoC</a></li>
+ </ul>
+ </section>
+ </section>
+ </body>
</document>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/site.xml?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/site.xml Fri Aug 10 05:58:14 2007
@@ -32,9 +32,12 @@
<about label="About">
<index label="Index" href="index.html" description="Welcome to org.apache.forrest.plugin.input.foaf"/>
<forrestPlugins label="Plugins Index" href="ext:forrest/plugins" description="Index of Forrest Plugins"/>
- </about>
+ <changes label="Changes" href="changes.html"
+ description="Keeping Track of Changes" />
+ <todo label="Todo" href="todo.html" description="Todo List" />
+ </about>
<samples label="Samples">
- <sample-1 label="Sample-1" href="personDetails.xml" description="Demonstration of functionality" />
+ <sample-1 label="Sample FOAF data" href="personDetails.html" description="Displays the FOAF data" />
</samples>
<!--
The href must be wholesite.html/pdf You can change the labels and node names
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/status.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/status.xml?view=diff&rev=564578&r1=564577&r2=564578
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/status.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/status.xml Fri Aug 10 05:58:14 2007
@@ -38,13 +38,15 @@
<action dev="OS" type="add" context="admin">
Initial plugin code.
</action>
+ <action dev="OS" type="add" context="docs">
+ Include a sample FOAF file and demonstrate functionality.
+ </action>
</release>
</changes>
<todo>
<actions priority="high">
<action context="docs" dev="open">
- Customize this template plugin with your plugin's details. This
- TODO list is generated from 'status.xml'.
+ Index multiple FOAF files from various sources.
</action>
<action context="docs" dev="open">
Create the documentation with lots of examples and samples.