forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Wheller <s...@inwords.co.za>
Subject Re: Help with sitemap.xmap - Docbook Plugin
Date Fri, 29 Oct 2004 13:47:39 GMT
On Thursday 28 October 2004 22:39, Sean Wheller wrote:
> > Jut try it, if it doesn't behave the way you expect then let me know
> > what is happening, what you want to happen and attach a zip of your
> > plugin to a bug report. I'll work with you to solve any problems you
> > come across.
>
> Yep. Playing nicely and learning from it. :-)

Hi,

OK I have some problem getting the docbook transformation to XHTML to show in 
the body of the aggregated content. I get all forrest trimmings but blank 
body. The Docbook Plugin shown here has been stripped down to on Docbook V4.3 
(I figure get one working and the rest will come.)

I have added XHTMLSerializer to the forrest sitemap it looks like this:

<map:serializer name="xhtml" 
src="org.apache.cocoon.serialization.XMLSerializer"
          mime-type="text/html" logger="sitemap.serializer.xhtml" 
pool-grow="2" pool-max="64" pool-min="2">
            <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>
            <encoding>UTF-8</encoding>
            <indent>yes</indent>
      </map:serializer>

The Docbook plugin sitemap looks like this:

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <map:components>
        <map:transformer default="xslt-saxon"/>
        <map:actions>
            <map:action logger="sitemap.action.sourcetype" name="sourcetype" 
src="org.apache.cocoon.acting.sourcetype.SourceTypeAction">
                <sourcetype name="docbook-v4.3">
                    <document-declaration public-id="-//OASIS//DTD DocBook XML 
V4.3//EN"/>
                </sourcetype>
            </map:action>
        </map:actions>

        <map:selectors default="parameter">
            <map:selector logger="sitemap.selector.parameter" name="parameter" 
src="org.apache.cocoon.selection.ParameterSelector"/>
        </map:selectors>
    </map:components>
    
    <map:resources>
        <map:resource name="transform-to-xhtml">
            <map:act type="sourcetype" src="{src}">
                <map:select type="parameter">
                    <map:parameter name="parameter-selector-test" 
value="{sourcetype}"/>
                    <map:when test="docbook-v4.3">
                        <map:transform 
src="{forrest:plugins}/docbook/resources/stylesheets/1.66.1/xhtml/docbook.xsl" 
type="xslt"/>
                    </map:when>
                    <map:otherwise/>
                </map:select>
            </map:act>
        </map:resource>
    </map:resources>

    <map:pipelines>
        <map:pipeline internal="true">
            <map:match pattern="**.xml">
                <map:generate src="{project:content.xdocs}{1}.xml"/>
                <map:call resource="transform-to-xhtml">
                    <map:parameter name="src" value="{project:content.xdocs}
{1}.xml"/>
                </map:call>
                <map:serialize type="xhtml"/>
            </map:match>
        </map:pipeline>
    </map:pipelines>
</map:sitemap>


Anyone got any ideas why this happens?

-- 
Sean Wheller
Technical Author
sean@inwords.co.za
http://www.inwords.co.za

Mime
View raw message