forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Adding a new content type in Apache Forrest site body?
Date Mon, 10 Feb 2003 23:32:07 GMT
On Mon, Feb 10, 2003 at 11:13:16AM -0800, kavitha sravanthi wrote:
> Hi,
> 
> Iam using 0.2 release of Apache Forrest, jdk version1.4.1_01 & Jboss,jetty server.
> 
> Currently iam facing problem with adding new content type in the forrest site body.
> I have my own XML generated by map:generate type="directory" & style sheet for that
> XML.(doesn?t follow documentv11 format).
> 
> 
>  <map:match pattern="body-repository.xml">
>             <map:generate type="directory" src="content/xdocs" />
>             <map:transform type="linkrewriter" src="cocoon:/{1}/linkmap" />
>             <map:transform src="skins/forrest-site/xslt/html/repository2Html.xsl"

Does repository2Html.xsl really generate HTML?  It shouldn't; it should
generate doc-v11 format XML.  If you really want to generate HTML, remove
the 'skinit' call below.

Also, it's probably better to put repository2Html.xsl in
src/documentation/resources/stylesheets/, and then reference it in the
sitemap with 'resources/stylesheets/repository2Html.xsl'

>             label="content" />
>             <map:call resource="skinit">
>                <map:parameter name="type" value="document2html" />
>                <map:parameter name="path" value="content/xdocs" />

This should be:
                <map:parameter name="path" value="/repository.xml" />

>                <map:parameter name="isfaq" value="true" />
>             </map:call>
>          </map:match>
> 
> Adding this pattern in my sitemap obviously not helping.I am seeing a blank forrest
> page with header, leftmenu, footer but no content inside the body area. I don't see
> any error as well.

For debugging this kind of problem, there are two tricks:

- Request the intermediate page, eg
  http://localhost:8888/body-repository.xml.  Check that it contains
  valid HTML in a <div class='content'> tag (I think).  Do a 'view
  source' on the result to see if there's any XML.
- If doing the above returns no XML, add a <map:serialize type="xml"/> at
  any point in the body-repository.xml pipe to see output at that point.
  Eg, add it directly after the XSL transform to see if your stylesheet
  works.  Remember to remove it after you're done debugging.


--Jeff

> I also tried with static XML file still I am having the same problem.
> Any suggestions to place my style sheet document in Forrest body...?
> 
> Thanks for ur time,
> Kavitha

Mime
View raw message