[EMAIL PROTECTED] wrote:
Author: rgardler
Date: Thu Mar  8 17:36:39 2007
New Revision: 516256

URL: http://svn.apache.org/viewvc?view=rev&rev=516256
Log:
- switch to using dispatch
- add doap-embedded.ft

What the log message should have said is that this new ft does not work, and I do not know why. It may well be that I should have been in bed at least two hours ago, and a screaming child is stopping me from thinking, but just in case someone with fresh eyes can see the problem before I wake up...

Added: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-embedded.ft

...

+<forrest:contract + xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
+  xmlns:forrest="http://apache.org/forrest/templates/1.0";
+  name="doap-embedded">
+ + <description>
+    <p>This template outputs html link elements for embedding DOAP files. </p>
+    <p>The contract requires the locations of DOAP files to be passed in as 
parameters using the following syntax :</p>
+    <source>&lt;doap url="<em>food.rdf</em>"&gt;</source>
+    <ul>
+      <li><strong>url</strong> attribute indicates the name location of the 
DOAP file.
+     The <strong>url</strong> attribute is required.
+ </li> + </ul>
+  </description>
+ + <usage><![CDATA[<forrest:contract name="doap-embedded">
+      <forrest:property name="doap-embedded-links">
+        <doap url="foo.rdf"/>
+        <doap url="foo.bar.xml"/>
+        ...
+      </forrest:property>
+    </forrest:contract>]]></usage>
+ + <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0";
+    name="doap-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="doap-embedded-links"/> + + <xsl:template match="/">
+        <forrest:content>
+          <forrest:part xpath="/html/head">
+            <xsl:apply-templates select="$doap-embedded-links"/>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+ + <xsl:template match="[EMAIL PROTECTED]">
+      <link href="mydoap.rdf" type=""/>
+        <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">DOAP</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>

...

Added: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv
+  <forrest:view type="html" hooksXpath="/html/body">
+    <forrest:contract name="doap-embedded">
+      <forrest:property name="doap-embedded-links">
+        <doap url="doap.rdf"/>
+      </forrest:property>
+    </forrest:contract>
+ + <jx:import uri="cocoon://prepare.tiles.pelt-html"/>
+  </forrest:view>
+</forrest:views>

The result is:

dispatcherError: 500 - Internal server error
The contract "doap-embedded" has thrown an exception by resolving the implementation from "cocoon://resolve.contract.html.doap-embedded".

dispatcherErrorStack:
org.apache.forrest.dispatcher.DispatcherException: 500 - Internal server error
component: ContractBean
message:
Could not setup transformer in the contractBean.
Please check that the contract implementation is wellformed and valid!


---

Looking at the locationmap log I see that the doap-embedded.ft is not found, it resolves to noFT

Any ideas?

Ross

Ross