forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Need help getting DocBook working
Date Fri, 10 Jun 2005 20:20:38 GMT
Addi wrote:
> Ross Gardler wrote:
>> Addi wrote:
>>> Ross Gardler wrote:
>>>> Addi wrote:
>> ...
>>>>> In order to really make my pitch to my boss to use Forrest I need 
>>>>> to be able to use WordPerfect docs with it.  WordPerfect does 
>>>>> publish to XML, but using the DocBook DTD, not Simplified DocBook.
>>>> First of all, have you tried just using the simplified-docbook 
>>>> plugin? It will recognise the DTD and use the available stylesheets. 
>>>> For a lrge number of docbook files this produces good results.
>>> Yes, I did try the s-docbook plugin and I have s-docbook documents 
>>> rendering fine with it, but I get nothing when I use a docbook DTD.  
>>> I had peeked at the s-docbook plugin files and it *looked* like it 
>>> would do what I wanted since input.xmap had the docbook DTDs and the 
>>> xsl had book and chapter elements, so I tried that first but it 
>>> didn't give me anything when I built the site.
>> Verify that the documenttype output by WordPerfect is matched by the 
>> simplified-docbook plugin. If the documenttype does not appear in the 
>> list of recognised DTD's you will need to add it to the plugin. There 
>> are a few examples in there already (see output.xmap)
> Well then.  I had checked it before but this time I copied it from 
> input.xmap and pasted and it worked.  I went back to look more closely 
> and WP is missing one slash in the DTD.  They have -//OASIS/DTD DocBook 
> XML V4.2//EN vs. -//OASIS*//*DTD DocBook XML V4.2//EN.  I have a call in 
> to Corel asking them tell me how to hack WP to output the correct DTD.

If it cannot be done then provide a patch for the plugin with a note of 
why it is needed and we'll apply it, I'm sure others may want to do thins.

Incidentally, I do have another solution, that is better still but needs 
some work. In sort use OOo running in server mode to convert from 
WordPerfect to OOo, then use the OOo plugin to get it into Forrest. This 
woks great for MSOffice. Problem is only OOo2 supports word perfect (I 
think) and our OOo plugin doesn;t support the new OpenDocument format.

> Once I get the WP DTD sorted out, I will be golden but related to the 
> serializer issue, I added the serializer to my project sitemap using the 
> cocoon example.  I am testing this separately from the DTD/plugin 
> solution above and now I am getting the page (yeah!) but in raw xhtml, 
> not skinned.  Is this related to the 0.7 raw html discussion that has 
> been going on (that I didn't really follow)?  I'm sorry that the whole 
> process isn't really clear to me at this point so I have difficulty 
> self-troubleshooting and I keep asking more questions everytime you answer.

That's no problem. Soon you'll know the answers and will answer other 
users questions. We all start somewhere.

To skin the content you need to change the sitemap entry to to:

<?xml version="1.0"?>
<map:sitemap xmlns:map="">
    <map:match pattern="resolver-*.xml">
     <map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
     <map:transform src="{forrest:stylesheets}/html2document.xsl" />
     <map:serialize type="xml"/>

The differences are that we are responding to a request for XML rather 
than HTML now. Forrest makes a request for an xml document as part of 
its resolving of HTML requests. That request will come here, we generate 
XHTMl using the docbook stylesheets, then we convert that to XDoc then 
the calling pipeline does the skinning.

There is a pretty good description of this process (from a differentuse 
case) in

I *think* this will work but I've not tried it. Pleae let us know how 
you get on, even if it doesn't work, I'll help you debug it because this 
is something we have come across before now and have hoped to test out.


View raw message