Thanks for the pointer, Ross.

Ross Gardler wrote:
> Ferdinand Soethe wrote:
>> I'd like to use DokuWiki as my CMS to generate content and Forrest to
>> render it. Since DokuWiki has a different syntax from MoinMoin and the
>> other wiki supported by our plugin I see two ways of rendering pages in
>> forrest:
>>
>> 1. Adapt the plugin to support DokuWiki-Syntax
>>    I'll look into that tonite but it seems beyond me to accomplish that
>
> This would be the best way as it will significantly reduce the
> processing required when requesting a document from the wiki since the
> wiki does not transform to HTML only to have Forrest transform that to
> XDoc. Better to go from wiki to XDoc.
>
> The wiki plugin uses Chaperon to do the transformations. Their docs
> are pretty good.
Yes, you are probably right. Have started to work on the
Doku-Wiki-Grammar but there are more problems to solve (find how the
grammar is selected) and find a way for Forrest to download the pages
right from the Internet.

>
>> 2. Use XHTML (that DokuWiki can generate) and have Forrest render it.
>>    To do so I added this entry to my site.xml
>>
>>    <wiki1 label="Leitseite des Wiki" href="/cmspage/start.html"/>
>>
>>    and this section to my custom sitemap
>>
>>    <map:match pattern="cmspage/**.xml">
>>      <map:generate type="html"
>> src="http://www.soethe.net/temp/dokuwiki/doku.php?id={1}&amp;do=export_html";
>>
>> />
>>                         <map:transform
>> src="{project:resources.stylesheets}/html2document.xsl" />
>>                         <map:serialize type="xml" />
>>             </map:match>
>>
>> Which will in fact render the desired page, but
>> unskinned as bare html where I expected it to get skinned in the
>> usual way.
>>
>> Any ideas what I did wrong?
>
> Are you sure your match is being executed? It doesn't sound like it.
> What do you get if you request /cmspage/start.xml? If the above
> pipeline is executed (as it should) you will get an Doc version of
> your XMS page.
You are right. A close look at the result of that pipeline shows that it
doesn't. I actually get the html delivered by dokuwiki.

However: If the pipeline isn't executed, how is the content of the
wikipage retrieved? To be sure I uncommented my pipeline.
And indeed, once I remove my pipeline I get an error message "The
requested resource "/cms/cmspage/start.xml" could not be found"
If I uncomment the pipeline again I get my html-result back.

Does that mean that only the retrieval part is executed?
I checked the existence and the validity of the style sheet and both
seem ok.

To be sure I inserted a character into the stylesheet to render it
invalid and bingo I get
this message

"The content of elements must consist of well-formed character data or markup."

which tells me that my stylesheet is found and used.

Now I'm really out of ideas.

Ferdinand