forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <>
Subject Re: i18n/dispatcher: language selection contract
Date Fri, 15 Sep 2006 07:58:52 GMT
Den 15. sep. 2006 kl. 08.14 skrev Sjur Moshagen:

> With the correction you made above, I get the same result as you -  
> it works!
> Thanks so far, I will now continue with the next step. I'm certain  
> I will be back with more questions soon:-)

So here it comes:-)

I got the simple version to work, now I would like to extract some  
info based on the requested document. I thus changed the pelt.fv hook  
to this:

           <forrest:hook class="languages">
             <forrest:contract name="language-variants"

Notice the @dataURI I've added.

I *think* I understand what's going on - here's what I believe,  
please verify or correct any misconception:

- the dataURI is looked up separately, and the returned data is  
served as an argument (XML snippet) to the contract, to do whatever  
more is needed

I have found matches for cocoon://**.title.xml, and copied it to my  
local sitemap, and modified it:

In src/documentation/sitemap.xmap:

       <map:match pattern="**.languages.xml">
         <map:generate src="cocoon://{1}.xml" />
         <map:transform src="{lm:dataModel-xml-document-to- 
languages.xsl}" />
         <map:serialize />

This should give me the source document, which is transformed with  
the specified stylesheet. I have the following in:


<xsl:stylesheet version="1.0" xmlns:xsl=" 
   <!--  Template to generate the document language -->
   <xsl:template match="document">
       <xsl:when test="@xml:lang">
         <xsl:copy-of select="@xml:lang"/>
         <title>*No* language found</title>


which I think the locationmap should be able to resolv, based on the  
following snippet in plugins/o.a.f.plugin.internal.dispatcher/ 

         <match pattern="dataModel-xml-document-to-**.xsl">
             <select type="exists">

With all this, and without changing the contract from what was  
working earlier, I get the following error:

Internal Server Error

Message: null

Description: No details available.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI


dispatcherError: 500 - Internal server error
The contract "language-variants" has thrown thrown an exception by  
resolving raw data from "cocoon://index.languages.xml".

  org.apache.excalibur.source.SourceException: Cannot get input  
stream for cocoon://index.languages.xml

Apache Cocoon 2.2.0-dev

 From what I can see, it isn't able to resolve the stylesheet OR the  
source document for some reason.


View raw message