forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: content-txt-link.ft query
Date Wed, 09 Jan 2008 13:17:54 GMT
On Wed, 2008-01-09 at 21:32 +0900, Gav.... wrote:
> 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 :-

The above error tells me that it is a problem with resolving.

Where did you store the content-txt-link?

salu2

> 
> <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/*/*[@name='skin-img-dir']/@value"/>
>       <xsl:variable name="filename-noext"
> select="$defaultVariables/*/*[@name='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...
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message