forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmcdon...@apache.org
Subject svn commit: r566436 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf: ./ resources/themes/ resources/themes/common/ resources/themes/common/html/ src/documentation/content/xdocs/ src/documentation/content/xdocs/images/ src/do...
Date Thu, 16 Aug 2007 00:26:48 GMT
Author: gmcdonald
Date: Wed Aug 15 17:26:47 2007
New Revision: 566436

URL: http://svn.apache.org/viewvc?view=rev&rev=566436
Log:
Add discoverability, enable dispatcher methods. Due to Oshani. Fix for FOR-1036

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/foaf-embedded.ft
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/images/group.png
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/pelt.fv
  (with props)
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/forrest.properties
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/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/forrest.properties
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/forrest.properties?view=diff&rev=566436&r1=566435&r2=566436
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/forrest.properties
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/forrest.properties
Wed Aug 15 17:26:47 2007
@@ -23,4 +23,4 @@
 # FIXME: FOR-785
 forrest.validate.skinconf=false
 
-project.required.plugins=org.apache.forrest.plugin.input.foaf,org.apache.forrest.plugin.input.projectInfo,org.apache.forrest.plugin.output.pdf
+project.required.plugins=org.apache.forrest.plugin.input.foaf,org.apache.forrest.plugin.input.projectInfo,org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.internal.dispatcher,org.apache.forrest.themes.core,org.apache.forrest.plugin.output.inputModule

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=566436&r1=566435&r2=566436
==============================================================================
--- 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
Wed Aug 15 17:26:47 2007
@@ -41,5 +41,24 @@
     <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>
+    <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>
+    <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>
     </locator>
 </locationmap>

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/foaf-embedded.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/foaf-embedded.ft?view=auto&rev=566436
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/foaf-embedded.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/foaf-embedded.ft
Wed Aug 15 17:26:47 2007
@@ -0,0 +1,75 @@
+<?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="foaf-embedded">
+  <description>
+    <p>
+      This template outputs html link elements for embedding FOAF files.
+    </p>
+
+    <p>
+      The contract requires the locations of FOAF files to be passed in as
+      parameters using the following syntax :
+    </p>
+    <source>&lt;foaf url="<em>foaf.rdf</em>"&gt;</source>
+    <ul>
+      <li><strong>url</strong> attribute indicates the location of the
FOAF file.
+      The <strong>url</strong> attribute is required.
+      </li>
+      </ul>
+  </description>
+  <usage>
+<![CDATA[<forrest:contract name="foaf-embedded">
+      <forrest:property name="foaf-embedded-links">
+        <foaf url="foaf.rdf"/>
+      </forrest:property>
+    </forrest:contract>]]>
+  </usage>
+  <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    name="foaf-embedded" 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:param name="foaf-embedded-links"/>
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part xpath="/html/head">
+            <xsl:apply-templates select="$foaf-embedded-links"/>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+      <xsl:template match="foaf[@url]"><link rel="meta" type="application/rdf+xml">
+        <xsl:choose>
+          <xsl:when test="@title">
+            <xsl:attribute name="title">
+              <xsl:value-of select="@title"/>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:attribute name="title">FOAF</xsl:attribute>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:attribute name="href">
+          <xsl:value-of select="@url"/>
+        </xsl:attribute></link>
+      </xsl:template>
+    </xsl:stylesheet>
+  </forrest:template>
+</forrest:contract>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/themes/common/html/foaf-embedded.ft
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/images/group.png
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/images/group.png?view=auto&rev=566436
==============================================================================
Binary file - no diff available.

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/content/xdocs/images/group.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

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=566436&r1=566435&r2=566436
==============================================================================
--- 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
Wed Aug 15 17:26:47 2007
@@ -58,12 +58,42 @@
       <person id="janeDoe" location="http://example.com/jane/foaf.rdf" />
    </people>
    ]]>
-        </source>
-        
-        
+        </source>        
       <p>A working example for FOAF files indexing to explore the FOAF data
        can be found <a href="people/index.html">here</a>.</p>
 	  </section>
+	  
+	  <section id="sample-3">
+	     <title>Linking FOAF files</title>
+	            <p>Tools such as the <a href="http://pingthesemanticweb.com/">PingTheSemanticWeb
web service</a>
+	            (which collects notifications about presence or updates to RDF data on the web),
and 
+	            <a href="http://sioc-project.org/firefox"> Semantic Radar extension for
Firefox</a> (which lets users to 
+	            discover RDF data on web pages while browsing), will be able to find the FOAF
data associated with the 
+	            website generated by this plugin.</p> 
+	            <p>You simply have to add the following markup in the <code>head</code>
of the HTML to link and make 
+	            your FOAF data auto-discoverable.</p> 
+	            <source>
+	            <![CDATA[
+   <link rel="meta" type="application/rdf+xml" title="FOAF" href="http://example.com/people/~you/foaf.rdf"
/>
+	            ]]>
+	            </source>
+	            <p>
+	            This can be done by using the <code>foaf-embedded</code> contract
by passing the URL of the FOAF
+	            file in the following manner:</p>
+	            <source>
+                <![CDATA[
+   <forrest:contract name="foaf-embedded">
+      <forrest:property name="foaf-embedded-links">
+         <foaf url="http://example.com/people/~you/foaf.rdf"/>
+      </forrest:property>
+   </forrest:contract>
+   ]]>
+  </source>
+  
+	            
+  </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=566436&r1=566435&r2=566436
==============================================================================
--- 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
Wed Aug 15 17:26:47 2007
@@ -39,6 +39,7 @@
   <samples label="Samples">
     <sample-1 label="Sample FOAF data" href="personDetails.html" description="Displays
the FOAF data" />
     <sample-2 label="Index of FOAF files" href="people/index.html" description="Aggregate
FOAF files for viewing" />
+    <sample-2 label="Linking FOAF files" href="/index.html#sample-3" description="FOAF
Auto-Discovery by Publishing and Linking FOAF files" />
   </samples>
 <!--
   The href must be wholesite.html/pdf  You can change the labels and node names

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/pelt.fv
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/pelt.fv?view=auto&rev=566436
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/pelt.fv
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/pelt.fv
Wed Aug 15 17:26:47 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.
+-->
+<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" 
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+<!-- The following variables are used to contact data models and/or contracts. -->
+  <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}"/>
+  <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
+  <jx:set var="getRequestExtension" value="#{$cocoon/parameters/getRequestExtension}"
/>
+  <forrest:view type="fo" hooksXpath="/">
+    <jx:import uri="cocoon://prepare.panels.common-fo"/>
+  </forrest:view>
+<!-- CSS View of the request e.g. index.dispatcher.css -->
+  <forrest:view type="css" hooksXpath="/">
+    <jx:import uri="cocoon://prepare.panels.pelt-css"/>
+  </forrest:view>
+  <forrest:view type="html" hooksXpath="/html/body">
+    <forrest:contract name="foaf-embedded">
+      <forrest:property name="foaf-embedded-links">
+        <foaf url="/personDetails/source.xml"/>
+      </forrest:property>
+    </forrest:contract>
+    <jx:import uri="cocoon://prepare.panels.pelt-html"/>
+  </forrest:view>
+</forrest:views>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/src/documentation/resources/themes/pelt.fv
------------------------------------------------------------------------------
    svn:eol-style = native

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=566436&r1=566435&r2=566436
==============================================================================
--- 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 Wed Aug
15 17:26:47 2007
@@ -44,6 +44,9 @@
       <action dev="OS" type="add" context="code">
         Index multiple FOAF files from various sources and view them.
       </action>
+      <action dev="OS" type="add" context="code">
+        Use of Dispatcher to link to FOAF data.
+      </action>
       
     </release>
   </changes>



Mime
View raw message