As an interim solution, I replaced htmltodocument.xsl with html2htmlbody.xsl and used the HTML serializer. It fixed the doubling problem and keeps most of the skinning.
It does look like the span match in html2document has a hard time with <span class=...>. The stylesheet looks like it is just duplicating anything that is inside of it. I'm loathe to modify this stylesheet because it is part of the Forrest core stuff. I am working on a stylesheet that can strip out the offending HTML tags in the HTML generated by the Docbook stylesheets though. Cheers, Eric > -----Original Message----- > From: David Crossley [mailto:[EMAIL PROTECTED] > Sent: Friday, May 26, 2006 12:34 AM > To: [email protected] > Subject: Re: Using Docbook > > Johnson, Eric wrote: > > I'm using the sitemap that Brian suggested, but with a local copy of the > > stylesheets. Most of the transform works great there are a few bugs > > though: > > > > The document title gets repeated so if the source starts of like: > > <article> > > <title>Foo</title> > > ... > > The resulting HTML page from Forrest starts of: > > Foo > > ----- > > Foo > > > > All of the entries in the TOC are doubled up. So for each > > <sect1> > > <title>Bar</title> > > ... > > The TOC entry is: > > BarBar > > > > All HTML generated from the <command> and <application> tags in docbook > > result in doubled up output. > > > > Is there a way to figure out if the errors are in the docbook xslt or in > > the Forrest xslt? Is there a way to fix this? > > Yes i noticed that too when i documented Brian's solution. > > When in 'forrest run' mode, look at the intermediate xml > localhost:8888/eric-test-docbook.xml > That definitely shows the double-up. > > Now temporarily adjust your sitemap.xmap to remove the > html-to-document transformer ... > > ... > <map:when test="docbook-v4.2"> > <map:generate src="{project:content.xdocs}{../1}.xml" /> > <map:transform src="file:///opt/local/share/xsl/docbook- > xsl/html/docbook.xsl"/> > <!-- > <map:transform src="{forrest:stylesheets}/html-to-document.xsl" /> > <map:transform type="idgen" /> > <map:serialize type="xml-document"/> > --> > <map:serialize type="xml"/> > </map:when> > ... > > localhost:8888/eric-test-docbook.xml > shows that these elements are not doubled here. > > I notice that there is a <span> element around > each element that is causing the problem. > > You would need to experiment with the XSLT in > that html-to-document.xsl > > One workaround might be to insert an additional > transformer after the html-to-document transformer. > It would be a simple stylesheet to transform only > the <div class="toc"> to use the first link in > each <dt>. It would just copy other elements that > you don't want to transform (<xsl:include href="copyover.xsl"/>) > > A better way might be to insert a new transformer > before the html-to-document transformer to massage > the output of the docbook-to-html transformer. > > As you can see, this approach of generating the docbook > to html, then html to forrest internal xdoc, then xdoc > to output html, is not ideal. We need help to implement the > planned internal xhtml2 rather than xdoc (document-v13). > > -David
