Hi All,
Taking a look at finishing off FOR-797 over the next few days.
I have done some, will commit all together. I can not get content-txt-link
to work however.
content-pdf-link.ft works fine when called from pelt-html.content.panel.xml
but as soon as I include content-txt-link.ft in there I get :-
" .. dispatcherError: 500 - Internal server error
The contract "content-txt-link" has thrown an exception by resolving the
implementation from "cocoon://resolve.contract.html.content-txt-link".
dispatcherErrorStack:
org.apache.excalibur.source.SourceException: Exception during processing of
cocoon://resolve.contract.html.content-txt-link .. "
When I look at resolve-contract.html I get
Error 440
<br/>
Template not found. This functions is a fallback when no ft is found.
This
is just a dummy, it will output *nothing*.
etc..
My updated content-txt-link.ft looks like :-
<forrest:contract name="content-txt-link"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
content-txt-link will output the TXT link with image to the content.
</description>
<usage>
<![CDATA[<forrest:contract name="content-txt-link"/>]]>
</usage>
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
name="content-txt-link" inputFormat="xsl" >
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="defaultVariables" select="'test.html'"/>
<xsl:variable name="skin-img-dir"
select="$defaultVariables/*/[EMAIL PROTECTED]'skin-img-dir']/@value"/>
<xsl:variable name="filename-noext"
select="$defaultVariables/*/[EMAIL PROTECTED]'filename-noext']/@value"/
<xsl:template match="/">
<forrest:content>
<forrest:part><a href="{$filename-noext}.txt" class="format">
<img class="skin" src="{$skin-img-dir}/txtdoc.png"
alt="TXT - icon" />
<span class="caption">TXT</span></a>
</forrest:part>
</forrest:content>
</xsl:template>
</xsl:stylesheet>
</forrest:template>
</forrest:contract>
I must have missed something ??
Gav...