You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Martin Holler <ho...@gmx.net> on 2004/09/12 10:08:06 UTC

DocBook stylesheets with forrest

Hello,

I started with the FAQ article
http://forrest.apache.org/faq.html#docbook because I would like to be
able to write my xml source in the DocBook format. Further I would
like to use the DocBook stylesheets directly. I have been trying to
get this working for a long time now and tryed a lot of different
things in the different files. Here is what my present configuration
looks like:

My asterisk.xml source file
---------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "">
<book lang="de">
<bookinfo>
  <title>Asterisk</title>
  <author><firstname>Martin</firstname><surname>Holler</surname></author>
</bookinfo>

<chapter>
  <title>SMS</title>
  <para>
  <variablelist>
    <title>Font Filename Extensions</title>
      <varlistentry>
        <term><filename>TTF</filename></term>
        <listitem>
          <para>
            TrueType fonts.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </para>
</chapter>
</book>

My src/documentation/sitemap.xmap file
--------------------------------------
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 <map:pipelines>
  <map:pipeline>
  <map:match pattern="**/resolver-*.html">
    <map:generate src="content/xdocs/{1}/resolver-{2}.xml"/>
    <map:transform src="file:///home/martin/opt/docbook-xsl-1.65.1/xhtml/docbook.xsl"/>
    <map:serialize/>
  </map:match>
  </map:pipeline>
 </map:pipelines>
</map:sitemap>

I do not know if I have to write <map:match
pattern="**/resolver-*.html"> (as I would say from the FAQ) or
<map:match pattern="**asterisk.xml"> (as I would say from reading
"Using Forrest") or if both of these are wrong. I tryed many things
here.

The error message
-----------------
------------------------------------------------------------------------ 
cocoon 2.1.2
Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
------------------------------------------------------------------------ 

X [0] favicon.ico BROKEN: No default type exists for 'match' at file:/home/martin/opt/apache-forrest-0.5.1-bin/private/build/tmp/context/./sitemap.xmap:5:43
X [0] index.html  BROKEN: No default type exists for 'match' at file:/home/martin/opt/apache-forrest-0.5.1-bin/private/build/tmp/context/./sitemap.xmap:5:43
Total time: 0 minutes 17 seconds

BUILD FAILED
/home/martin/opt/apache-forrest-0.5.1-bin/forrest.build.xml:631: Java returned: 1

I do not have this error message when there is no sitemap.xmap in
src/documentation. But then forrest does not use the DocBook
stylesheets. I use the binary Version of forrest 0.5.1.
BTW: I do not want the favicon.ico to be created. Where can I turn
this off.
Thanks for your time reading this.

Regards,

        Martin

Re: DocBook stylesheets with forrest

Posted by David Crossley <cr...@apache.org>.
Johannes Schaefer wrote:
> David Crossley wrote:
> > You are using the full DocBook stylesheets directly.
> > 
> > The alternative method described at that FAQ will
> > enable the pages to be adorned with the normal Forrest
> > navigation menus and such. Beware the limitations,
> > and please sends patches to improve the handling.
> 
> Wouldn't it be possible to use the DocBook output as
> *.ehtml to get the forrest-decorations?!

That is an interesting idea. Not *.ehtml because that
has been deprecated, but *.html)

So i gather that you are suggesting another stage in
the Cocoon pipeline. The Content Aware Pipelines that
are used in forrest.xmap could detect the doctype.

This is what we are hinting at when we say that there
is vast additional power in the Cocoon sitemap.

One issue is that we already use that detection to
enable our partial "docbook" support. It might be
possible to configure that to use the full DB XSL
if it is available, otherwise partial.

Another issue is that the user would need to have the
full DocBook XSL installed locally. That could just
be listed as one of our FAQs.

However, this is now getting into development issues
rather than user issues, so should be discussed on the
"dev" mailing list.

-- 
David Crossley


Re: DocBook stylesheets with forrest

Posted by Johannes Schaefer <jo...@uidesign.de>.
David Crossley wrote:
> Martin Holler wrote:
> 
>>David Crossley writes:
>>
>>>Martin Holler wrote:
>>>
>>>>I started with the FAQ article
>>>>http://forrest.apache.org/faq.html#docbook because I would like to be
>>>>able to write my xml source in the DocBook format. Further I would
>>>>like to use the DocBook stylesheets directly. I have been trying to
>>>>get this working for a long time now and tryed a lot of different
>>>>things in the different files.
>>
>>[...]
>>
>>
>>>Using Forrest-0.6-dev it is much easier and you just use the
>>>simplified sitemap like you have shown above.
>>
>>Thanks very much for your reply David! I installed Forrest-0.6-dev and
>>the DocBook stylesheets are used directly now.
> 
> 
> Beauty.
> 
> 
>>But now I have a further question which is linked to my first
>>one. When I click the link in the tab menu to my asterisk page (whose
>>xml source is DocBook) the asterisk documentation is opened in my
>>browser window but without the tabs and forrest headings and
>>footers. I would like to have the tabs and logos to be present on the
>>"DocBook pages" as well - just as they are on pages whose source is
>>the forrest xml.
>>
>>Does anybody know how to accomplish this? That would be great.
> 
> 
> You are using the full DocBook stylesheets directly.
> 
> The alternative method described at that FAQ will
> enable the pages to be adorned with the normal Forrest
> navigation menus and such. Beware the limitations,
> and please sends patches to improve the handling.
> 


Wouldn't it be possible to use the DocBook output as
*.ehtml to get the forrest-decorations?!

Johannes


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 * 
D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de

Attraktivität von interaktiven Produkten messen mit
www.attrakdiff.de

Re: DocBook stylesheets with forrest

Posted by David Crossley <cr...@apache.org>.
Martin Holler wrote:
> David Crossley writes:
> > Martin Holler wrote:
> >> I started with the FAQ article
> >> http://forrest.apache.org/faq.html#docbook because I would like to be
> >> able to write my xml source in the DocBook format. Further I would
> >> like to use the DocBook stylesheets directly. I have been trying to
> >> get this working for a long time now and tryed a lot of different
> >> things in the different files.
> 
> [...]
> 
> > Using Forrest-0.6-dev it is much easier and you just use the
> > simplified sitemap like you have shown above.
> 
> Thanks very much for your reply David! I installed Forrest-0.6-dev and
> the DocBook stylesheets are used directly now.

Beauty.

> But now I have a further question which is linked to my first
> one. When I click the link in the tab menu to my asterisk page (whose
> xml source is DocBook) the asterisk documentation is opened in my
> browser window but without the tabs and forrest headings and
> footers. I would like to have the tabs and logos to be present on the
> "DocBook pages" as well - just as they are on pages whose source is
> the forrest xml.
> 
> Does anybody know how to accomplish this? That would be great.

You are using the full DocBook stylesheets directly.

The alternative method described at that FAQ will
enable the pages to be adorned with the normal Forrest
navigation menus and such. Beware the limitations,
and please sends patches to improve the handling.

-- 
David Crossley


Re: DocBook stylesheets with forrest

Posted by Martin Holler <ho...@gmx.net>.
David Crossley <cr...@apache.org> writes:

> Martin Holler wrote:
>> Hello,
>> 
>> I started with the FAQ article
>> http://forrest.apache.org/faq.html#docbook because I would like to be
>> able to write my xml source in the DocBook format. Further I would
>> like to use the DocBook stylesheets directly. I have been trying to
>> get this working for a long time now and tryed a lot of different
>> things in the different files.

[...]

> Using Forrest-0.6-dev it is much easier and you just use the
> simplified sitemap like you have shown above.

Thanks very much for your reply David! I installed Forrest-0.6-dev and
the DocBook stylesheets are used directly now.

But now I have a further question which is linked to my first
one. When I click the link in the tab menu to my asterisk page (whose
xml source is DocBook) the asterisk documentation is opened in my
browser window but without the tabs and forrest headings and
footers. I would like to have the tabs and logos to be present on the
"DocBook pages" as well - just as they are on pages whose source is
the forrest xml.

Does anybody know how to accomplish this? That would be great.

Regards,
        Martin

Re: DocBook stylesheets with forrest

Posted by David Crossley <cr...@apache.org>.
Martin Holler wrote:
> Hello,
> 
> I started with the FAQ article
> http://forrest.apache.org/faq.html#docbook because I would like to be
> able to write my xml source in the DocBook format. Further I would
> like to use the DocBook stylesheets directly. I have been trying to
> get this working for a long time now and tryed a lot of different
> things in the different files.

It does work because we do that with two documents at the
XML Commons website. See
http://cvs.apache.org/viewcvs.cgi/xml-commons/src/documentation/sitemap.xmap?view=markup
and "Find in page" DocBook.

> Here is what my present configuration
> looks like:
> 
> My asterisk.xml source file
> ---------------------------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>   "">
> <book lang="de">
> <bookinfo>
>   <title>Asterisk</title>
>   <author><firstname>Martin</firstname><surname>Holler</surname></author>
> </bookinfo>
> 
> <chapter>
>   <title>SMS</title>
>   <para>
>   <variablelist>
>     <title>Font Filename Extensions</title>
>       <varlistentry>
>         <term><filename>TTF</filename></term>
>         <listitem>
>           <para>
>             TrueType fonts.
>           </para>
>         </listitem>
>       </varlistentry>
>     </variablelist>
>   </para>
> </chapter>
> </book>
> 
> My src/documentation/sitemap.xmap file
> --------------------------------------
> <?xml version="1.0"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>  <map:pipelines>
>   <map:pipeline>
>   <map:match pattern="**/resolver-*.html">
>     <map:generate src="content/xdocs/{1}/resolver-{2}.xml"/>
>     <map:transform src="file:///home/martin/opt/docbook-xsl-1.65.1/xhtml/docbook.xsl"/>
>     <map:serialize/>
>   </map:match>
>   </map:pipeline>
>  </map:pipelines>
> </map:sitemap>

If you are going to use Forrest-0.5.1 then you need to follow
the local documentation that comes with that version. As specified
on the Forrest home page, the website documentation relates to
the current development version forrest-0.6-dev

For Forrest-0.5.1 you need to copy the whole sitemap and
insert a match to specifically handle your "asterisk" doc.
Follow your local "Using Forrest" document.

Using Forrest-0.6-dev it is much easier and you just use the
simplified sitemap like you have shown above.

> I do not know if I have to write <map:match
> pattern="**/resolver-*.html"> (as I would say from the FAQ) or
> <map:match pattern="**asterisk.xml"> (as I would say from reading
> "Using Forrest") or if both of these are wrong. I tryed many things
> here.

That match is just an example. Yes you need to explicitly
match the asterisk.html

<snipped errors that arise from using a broken sitemap/>

-- 
David Crossley