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 using. In views the content-minitoc.ft is using it after the processing of document2html.xls: http://svn.apache.org/viewcvs.cgi/*checkout*/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-minitoc.ft <xsl:template name="content-minitoc-body" match="[EMAIL PROTECTED]'content']/[EMAIL PROTECTED]'skinconf-toc-page']"> <xsl:comment>+ |start content-minitoc +</xsl:comment> <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"/> </xsl:call-template> </div> </xsl:if> </xsl:if> </xsl:if> <xsl:comment>+ |end minitoc +</xsl:comment> </xsl:template> I intercept the last processing pipeline (site2xhmtl.xsl) with views and like state before using document2html.xsl from the skin. http://svn.apache.org/viewcvs.cgi/*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:aggregate> <map:serialize type="xml"/> </map:match> > 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, right? 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? http://svn.apache.org/viewcvs.cgi/*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" src="org.apache.cocoon.serialization.XMLSerializer"> <!--+ | 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>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system> | For Transitional XHTML set doctype to: | <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public> | <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system> | For Frameset XHTML set doctype to: | <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public> | <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</doctype-system> | | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than one | XHTML DTD simultaneously, you can define several XHTML serializers. +--> <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system> <encoding>UTF-8</encoding> </map:serializer> HTH salu2 -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)
