forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: TOC in output plugin
Date Sat, 09 Jul 2005 13:44:25 GMT
On Sat, 2005-07-09 at 14:57 +0200, HANAX wrote:
> I was told that durin processing there is a TOC build. How I can acces it in my XSL file?

this ToC is created for e.g. in document2html.xls from the skin you are

In views the content-minitoc.ft is using it after the processing of
<xsl:template name="content-minitoc-body"
	    |start content-minitoc
		    <xsl:if test="$config/toc">
		      <xsl:if test="contains($minitoc-location,'page')">
		        <xsl:if test="count(//tocitems/tocitem) >= $config/toc/@min-sections">
					<div id="content-minitoc-area">
		    			<xsl:call-template name="minitoc">
		        		    <xsl:with-param name="tocroot" select="//tocitems"/>
    |end minitoc

I intercept the last processing pipeline (site2xhmtl.xsl) with views and
like state before using document2html.xsl from the skin.*checkout*/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap
 <map:match pattern="*.page">
	<map:aggregate element="site">
          <map:part src="cocoon://skinconf.xml"/>
          <map:part src="cocoon://build-info"/>
          <map:part src="cocoon://tab-{1}.html"/>
          <map:part src="cocoon://menu-{1}.html"/>
          <map:part src="cocoon://body-{1}.html"/>
          <map:part src="cocoon:/prepare.view-nugget.{1}"/>
        <map:serialize type="xml"/>

>  Or another way: how can I access list of sections and transform it into list of elements
in head of XHTML while processing my xsl file?

Can you tell a little bit more what you are planing to do? It sounds to
me that you could use views for what you are planing to do.

Let me explain why. I remember you doing the sound output via forrest,

I reckon you would not only output the document content but as well
navigation, or?

If so you would create a plugin of the same nature of
org.apache.forrest.plugin.output.viewHelper.xhtml or general speaking a
view plugin.

A view plugin allows to output content to different presentation medias.
I am very keen to assist if you need more infos on how to do it.

> I've started with text plugin as example but it's little bit complicated for me, can
anybody recommend me simpler example?
> And last, if I want to use XHTML serializer, it gives me an error "Type 'xhtml' does
not exist for 'map:serialize'". Why?*checkout*/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap
<map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html"
name="xhtml" pool-grow="2" pool-max="64" pool-min="2"
	          | You can choose from Strict, Transitional, or Frameset XHTML.
	          | For Strict XHTML set doctype to:
	          |   <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
	          |   <doctype-system></doctype-system>
	          | For Transitional XHTML set doctype to:
	          |   <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
	          |   <doctype-system></doctype-system>
	          | For Frameset XHTML set doctype to:
	          |   <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public>
	          |   <doctype-system></doctype-system>
	          | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than
	          | XHTML DTD simultaneously, you can define several XHTML serializers.
	      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>



"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message