You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by kavitha sravanthi <ka...@yahoo.com> on 2003/02/10 20:13:16 UTC
Adding a new content type in Apache Forrest site body?
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"
label="content" />
<map:call resource="skinit">
<map:parameter name="type" value="document2html" />
<map:parameter name="path" value="content/xdocs" />
<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. 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
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Thanks
Posted by kavitha sravanthi <ka...@yahoo.com>.
Hi Jeff,
Thanks for the suggestion.I got that working.
Kavitha
Jeff Turner <je...@apache.org> wrote: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).
>
>
>
>
>
>
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" />
>
>
>
This should be:
>
>
>
>
> 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 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 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
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Re: Adding a new content type in Apache Forrest site body?
Posted by Jeff Turner <je...@apache.org>.
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