You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Sean Wheller <se...@enbaya.co.za> on 2004/04/13 14:12:49 UTC

Using Docbook XSL's

Hello,

I am new to forrest and enjoying it very much. However, I would like to find a 
solution to use the Norman Walsh stylesheets for HTML and FO 
conversion.

I have read the FAQ, but I am afraid that this is very vague. It referenced to 
the sitemap.xmap and I am not sure that this has anything to do with my 
problem. Perhaps I am wrong. I have also searched the mail-archive, where I 
found a thread that almost made it clear to me, but when I try I get errors.

The problem is that I do NOT want Forrest to transform to Docbook XML 4.2 
content to the Apache XHTML. The stylesheets supplied with, forrest while 
doing a reasonable job, do not handle many of the docbook tags.

I have copied the *.xmap to documentation/

For HTML I have modified forrest.xmap to point to my local installation of 
html/docbook.xsl

The default forrest default is:
<map:when test="docbook-v4.2">
    <map:transform src="resources/stylesheets/docbook2document.xsl" />
</map:when>

After modification:
<map:when test="docbook-v4.2">
    <map:transform src="/usr/share/sgml/docbook/
docbook-xsl-stylesheets-1.61.3/html/docbook.xsl" />
</map:when>

When I run "forrest" in the project everything runs fine until it comes time 
to create the output. It exits with 

* [0]   1.432s 766b    favicon.ico
X [0]                       index.html  BROKEN: java.lang.NullPointerException
Total time: 0 minutes 20 seconds

BUILD FAILED
/usr/local/forrest/forrest.build.xml:631: Java returned: 1

This is for HTML. Once I fix this problem I will move on to how to get PDF.

Any ideas what may be wrong.

-- 
Sean Wheller


Re: Using Docbook XSL's

Posted by Sean Wheller <se...@enbaya.co.za>.
On Wednesday 14 April 2004 02:32, David Crossley wrote:
> Sean Wheller wrote:
> > Hello,
> >
[snip]
> > For HTML I have modified forrest.xmap to point to my local installation
> > of html/docbook.xsl
> >
> > The default forrest default is:
> > <map:when test="docbook-v4.2">
> >     <map:transform src="resources/stylesheets/docbook2document.xsl" />
> > </map:when>
> >
> > After modification:
> > <map:when test="docbook-v4.2">
> >     <map:transform src="/usr/share/sgml/docbook/
> > docbook-xsl-stylesheets-1.61.3/html/docbook.xsl" />
> > </map:when>
>
> No, do not do that. This is just interfering with the forrest
> internal pipeline that is using the minimal docbook2document.xsl
> This goes via the intermediate Forrest "document" format.
>
> > When I run "forrest" in the project everything runs fine until it comes
> > time to create the output. It exits with
> >
> > * [0]   1.432s 766b    favicon.ico
> > X [0]                       index.html  BROKEN:
> > java.lang.NullPointerException Total time: 0 minutes 20 seconds
> >
> > BUILD FAILED
> > /usr/local/forrest/forrest.build.xml:631: Java returned: 1
> >
> > This is for HTML. Once I fix this problem I will move on to how to get
> > PDF.
> >
> > Any ideas what may be wrong.
>
> This hack to forrest.xmap is just feeding Forrest with events
> that it is not expecting, because you replaced the intermediate
> transformation.
>
> Go back to the FAQ, and tell us the "errors" that you receive.
> If there is something not clear in the FAQ, then please ask.

Thanks David. Will go back to sitemap.xmap and the faq. Questions will revert 
to the list.

-- 
Sean Wheller


Re: Using Docbook XSL's

Posted by David Crossley <cr...@apache.org>.
Sean Wheller wrote:
> Hello,
> 
> I am new to forrest and enjoying it very much. However, I would like to find a 
> solution to use the Norman Walsh stylesheets for HTML and FO 
> conversion.
> 
> I have read the FAQ, but I am afraid that this is very vague. It referenced to 
> the sitemap.xmap and I am not sure that this has anything to do with my 
> problem. Perhaps I am wrong. I have also searched the mail-archive, where I 
> found a thread that almost made it clear to me, but when I try I get errors.

That is exactly what you need to do. Follow the FAQ and use
your own copy of sitemap.xmap (you do not need to duplicate
the other *.xmap)

> The problem is that I do NOT want Forrest to transform to Docbook XML 4.2 
> content to the Apache XHTML. The stylesheets supplied with, forrest while 
> doing a reasonable job, do not handle many of the docbook tags.
> 
> I have copied the *.xmap to documentation/

See above, but only copy sitemap.xmap and not the others.

> For HTML I have modified forrest.xmap to point to my local installation of 
> html/docbook.xsl
> 
> The default forrest default is:
> <map:when test="docbook-v4.2">
>     <map:transform src="resources/stylesheets/docbook2document.xsl" />
> </map:when>
> 
> After modification:
> <map:when test="docbook-v4.2">
>     <map:transform src="/usr/share/sgml/docbook/
> docbook-xsl-stylesheets-1.61.3/html/docbook.xsl" />
> </map:when>

No, do not do that. This is just interfering with the forrest
internal pipeline that is using the minimal docbook2document.xsl
This goes via the intermediate Forrest "document" format.

> When I run "forrest" in the project everything runs fine until it comes time 
> to create the output. It exits with 
> 
> * [0]   1.432s 766b    favicon.ico
> X [0]                       index.html  BROKEN: java.lang.NullPointerException
> Total time: 0 minutes 20 seconds
> 
> BUILD FAILED
> /usr/local/forrest/forrest.build.xml:631: Java returned: 1
> 
> This is for HTML. Once I fix this problem I will move on to how to get PDF.
> 
> Any ideas what may be wrong.

This hack to forrest.xmap is just feeding Forrest with events
that it is not expecting, because you replaced the intermediate
transformation.

Go back to the FAQ, and tell us the "errors" that you receive.
If there is something not clear in the FAQ, then please ask.

--David