You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Addi <ad...@rocktreesky.com> on 2005/06/09 23:03:05 UTC
Need help getting DocBook working
I'll preface this with the fact I do not understand sitemaps and while I
have been trying to wrap my head around it for two days, I have way too
much other stuff going on to figure them out beyond the basic concept.
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. I tried following
the faq (http://forrest.apache.org/0.7/docs/faq.html#docbook) about
using DocBook but I don't really get it all. I do have Norman Walsh's
DocBook stylesheets and I put them into
PROJECT_HOME\src\documentation\resources\stylesheets.
With this sitemap.xmap (just following the example in the faq):
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<map:pipeline>
<map:match pattern="**wp.html">
<map:generate src="{project:content.xdocs}{1}wp.xml"/>
<map:transform
src="{project:resources.stylesheets}/docbook.xsl"/>
<map:serialize type="xhtml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
It fails at linkmap.html with a long bunch of treeprocessor stuff, and
this BROKEN message:
URI not found: Type 'xhtml' does not exist for 'map:serialize' at file:
PROJECT_HOME/src/documentation/sitemap.xmap:9:34
Any help is appreciated.
Thanks
Addi
Re: Need help getting DocBook working
Posted by David Crossley <cr...@apache.org>.
Addi wrote:
> Ross Gardler wrote:
> >Addi wrote:
> >
> >> I tried following the faq
> >>(http://forrest.apache.org/0.7/docs/faq.html#docbook) about using
> >>DocBook but I don't really get it all. I do have Norman Walsh's
> >>DocBook stylesheets and I put them into
> >>PROJECT_HOME\src\documentation\resources\stylesheets.
This method should work. It did last time that i tried it.
I have a site that i will be using as one on my tests for the
upcoming release that uses full DocBook, so i will try over
the next few days.
You need to ensure that the Public Identifier in the top of your
xml instances is exactly one of those specified in the sitemap
plugins/org.apache.forrest.plugin.input.simplified-docbook/input.xmap
--David
> >>It fails at linkmap.html with a long bunch of treeprocessor stuff,
> >>and this BROKEN message:
> >>URI not found: Type 'xhtml' does not exist for 'map:serialize' at
> >>file: PROJECT_HOME/src/documentation/sitemap.xmap:9:34
> >
> >>
> >>You need to define the xhtml serializer used in <map:serialize
> >>type="xhtml"/> in the components section of the sitemap.
> >>
> >>See
> >>http://cocoon.apache.org/2.1/userdocs/serializers/xhtml-serializer.html
> >>for the elements you need to add to define this component. You can
> >>see examples in the FORREST_HOME/main/webapp/sitemap.xmap
> >
> Excellent, thanks for that. Looks simple enough.
> Addi
Re: Need help getting DocBook working
Posted by Ross Gardler <rg...@apache.org>.
Addi wrote:
> Ross Gardler wrote:
>
>> Addi wrote:
>>
>>> Ross Gardler wrote:
>>>
>>>> Addi wrote:
>>>
>>> ...
>>>
...
>>>> To skin the content you need to change the sitemap entry to to:
>>>>
>>>> <?xml version="1.0"?>
>>>> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>>>> <map:pipelines>
>>>> <map:pipeline>
>>>> <map:match pattern="resolver-*.xml">
>>>> <map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
>>>> <map:transform
>>>>
>>>> src="file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
>>>>
>>>> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
>>>> <map:serialize type="xml"/>
>>>> </map:match>
>>>> </map:pipeline>
>>>> </map:pipelines>
>>>> </map:sitemap>
>>>>
...
>>>> 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.
>>>
>>> Well, I modified the sitemap and it didn't like the change. I now
>>> get nothing with this:
>>> <map:pipelines>
>>> <map:pipeline>
>>> <map:match pattern="**wp.xml">
>>> <map:generate src="{project:content.xdocs}{1}wp.xml"/>
>>> <map:transform
>>>
>>> src="file:///C:/xsl/docbook/docbook-xsl-1.68.1/xhtml/docbook.xsl"/>
>>> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
>>> <map:serialize type="xml"/>
>>> </map:match>
>>> </map:pipeline>
>>> </map:pipelines>
>>>
...
>>
>> Comment out the second transform, what do you see when requesting
>> "***wp.xml"
>
>
> Did this and requesting **wp.xml with the first transform gives me de
> nada - blank, skinned page.
If the page is skinned then you did not request **wp.xml, you must have
requested **wp.html. We need to verify that you are getting the docbook
file as html then we need to work out why it is not succsefully being
converted to an xdoc.
>> There is currently a bug in html2document that results in no content
>> being displayed under certain conditions -
>> http://issues.apache.org/jira/browse/FOR-394
>
>
> I looked at this but I don't grasp it all enough for it to give me any
> insight.
I think what is happening is that the HTML produced by your docbook xsl
is not being processed by the html2document.xsl because of the above
bug. Once you can see your html output from the first phase we can
confirm that this is/is not the case and proceed to solve the problem.
> BTW, related but aside, I finally talked to Corel Priority WordPerfect
> support and they agreed that they have a typo in their output but it is
> hardcoded in the app so I can't hack it.
...
> So I will need to edit each WP "publish to XML" file and add
> the missing slash. (I sense a script coming on...) I'm not sure if
> this is really worth patching Forrest for since WP use is probably
> pretty limited.
There is another alternative that may interest you, although it requires
a little work. Recently I needed to include MS Word documents in a
Forrest site. These documents were constantly being edited so it was not
really an option to manually save them each time (often they were edited
outside of the organsiation so there was no control over the save format).
The solution I came up with is a plugin that uses OpenOffice to convert
the MS Word documents to OOo documents, then we use the OOo plugin to
include them in the Forrest site. You could do the same thing for your
WP documents.
The only problem is only OOo v2 has WP support so some changes to the
generator may be needed to get the interaction with OOoV2 going.
The benefit is that you don't have to manually save files in an external
format and you don't need to work around the docbook Doctype bug in WP.
The plugin is not available via Apache because the license of some of
the libs is not compatible. However, I can make it available to you if
you want me to. I intend to publish it soon, I just haven't got around
to it yet.
Ross
Re: Need help getting DocBook working
Posted by Addi <ad...@rocktreesky.com>.
Ross Gardler wrote:
> Addi wrote:
>
>> Ross Gardler wrote:
>>
>>> Addi wrote:
>>
>>
>>
>> ...
>>
>>>> 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="http://apache.org/cocoon/sitemap/1.0">
>>> <map:pipelines>
>>> <map:pipeline>
>>> <map:match pattern="resolver-*.xml">
>>> <map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
>>> <map:transform
>>>
>>> src="file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
>>>
>>> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
>>> <map:serialize type="xml"/>
>>> </map:match>
>>> </map:pipeline>
>>> </map:pipelines>
>>> </map:sitemap>
>>>
>>> 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
>>> http://forrest.apache.org/0.7/docs/howto/howto-custom-html-source.html#Understanding%20the%20HTML-Pipeline
>>>
>>
>>
>>
>> Thanks for that, it definitely helped. I am beginning to get a fuzzy
>> picture of it now. :)
>>
>>>
>>> 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.
>>
>>
>>
>> Well, I modified the sitemap and it didn't like the change. I now
>> get nothing with this:
>> <map:pipelines>
>> <map:pipeline>
>> <map:match pattern="**wp.xml">
>> <map:generate src="{project:content.xdocs}{1}wp.xml"/>
>> <map:transform
>>
>> src="file:///C:/xsl/docbook/docbook-xsl-1.68.1/xhtml/docbook.xsl"/>
>> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
>> <map:serialize type="xml"/>
>> </map:match>
>> </map:pipeline>
>> </map:pipelines>
>>
>> I realize that you are busy this week with the release and I am not
>> in a rush to get this figured out, so we can come back to this when
>> you have the time. Thanks for your help.
>>
>
> Comment out the second transform, what do you see when requesting
> "***wp.xml"
Did this and requesting **wp.xml with the first transform gives me de
nada - blank, skinned page.
>
> There is currently a bug in html2document that results in no content
> being displayed under certain conditions -
> http://issues.apache.org/jira/browse/FOR-394
I looked at this but I don't grasp it all enough for it to give me any
insight.
BTW, related but aside, I finally talked to Corel Priority WordPerfect
support and they agreed that they have a typo in their output but it is
hardcoded in the app so I can't hack it. They have notified the dev
team, so hopefully future versions (or a patch) will incorporate the
change. So I will need to edit each WP "publish to XML" file and add
the missing slash. (I sense a script coming on...) I'm not sure if
this is really worth patching Forrest for since WP use is probably
pretty limited.
- Addi
Re: Need help getting DocBook working
Posted by Ross Gardler <rg...@apache.org>.
Addi wrote:
> Ross Gardler wrote:
>
>> Addi wrote:
>
>
> ...
>
>>> 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="http://apache.org/cocoon/sitemap/1.0">
>> <map:pipelines>
>> <map:pipeline>
>> <map:match pattern="resolver-*.xml">
>> <map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
>> <map:transform
>>
>> src="file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
>> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
>> <map:serialize type="xml"/>
>> </map:match>
>> </map:pipeline>
>> </map:pipelines>
>> </map:sitemap>
>>
>> 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
>> http://forrest.apache.org/0.7/docs/howto/howto-custom-html-source.html#Understanding%20the%20HTML-Pipeline
>>
>
>
> Thanks for that, it definitely helped. I am beginning to get a fuzzy
> picture of it now. :)
>
>>
>> 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.
>
>
> Well, I modified the sitemap and it didn't like the change. I now get
> nothing with this:
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="**wp.xml">
> <map:generate src="{project:content.xdocs}{1}wp.xml"/>
> <map:transform
>
> src="file:///C:/xsl/docbook/docbook-xsl-1.68.1/xhtml/docbook.xsl"/>
> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
> </map:pipelines>
>
> I realize that you are busy this week with the release and I am not in a
> rush to get this figured out, so we can come back to this when you have
> the time. Thanks for your help.
>
Comment out the second transform, what do you see when requesting
"***wp.xml"
There is currently a bug in html2document that results in no content
being displayed under certain conditions -
http://issues.apache.org/jira/browse/FOR-394
Ross
Re: Need help getting DocBook working
Posted by Addi <ad...@rocktreesky.com>.
Ross Gardler wrote:
> Addi wrote:
...
>> 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="http://apache.org/cocoon/sitemap/1.0">
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="resolver-*.xml">
> <map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
> <map:transform
>
> src="file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
> <map:transform src="{forrest:stylesheets}/html2document.xsl" />
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> </map:sitemap>
>
> 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
> http://forrest.apache.org/0.7/docs/howto/howto-custom-html-source.html#Understanding%20the%20HTML-Pipeline
>
Thanks for that, it definitely helped. I am beginning to get a fuzzy
picture of it now. :)
>
> 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.
Well, I modified the sitemap and it didn't like the change. I now get
nothing with this:
<map:pipelines>
<map:pipeline>
<map:match pattern="**wp.xml">
<map:generate src="{project:content.xdocs}{1}wp.xml"/>
<map:transform
src="file:///C:/xsl/docbook/docbook-xsl-1.68.1/xhtml/docbook.xsl"/>
<map:transform src="{forrest:stylesheets}/html2document.xsl" />
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
I realize that you are busy this week with the release and I am not in a
rush to get this figured out, so we can come back to this when you have
the time. Thanks for your help.
- Addi
Re: Need help getting DocBook working
Posted by Ross Gardler <rg...@apache.org>.
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="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<map:pipeline>
<map:match pattern="resolver-*.xml">
<map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
<map:transform
src="file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
<map:transform src="{forrest:stylesheets}/html2document.xsl" />
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
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
http://forrest.apache.org/0.7/docs/howto/howto-custom-html-source.html#Understanding%20the%20HTML-Pipeline
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.
Ross
Re: Need help getting DocBook working
Posted by Addi <ad...@rocktreesky.com>.
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.
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.
Thanks
Addi
Re: Need help getting DocBook working
Posted by Ross Gardler <rg...@apache.org>.
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)
Ross
Re: Need help getting DocBook working
Posted by Addi <ad...@rocktreesky.com>.
Ross Gardler wrote:
> Addi wrote:
>
>> I'll preface this with the fact I do not understand sitemaps and
>> while I have been trying to wrap my head around it for two days, I
>> have way too much other stuff going on to figure them out beyond the
>> basic concept. 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. (The DTD itself and the book and
chapter elements are the only things in these files that are not
s-docbook.) If I change the DTD to simplified, change book to article
and delete chapter elements, it renders fine. Any ideas on what to look
at to figure out why s-docbook plugin isn't doing it for me?
>> I tried following the faq
>> (http://forrest.apache.org/0.7/docs/faq.html#docbook) about using
>> DocBook but I don't really get it all. I do have Norman Walsh's
>> DocBook stylesheets and I put them into
>> PROJECT_HOME\src\documentation\resources\stylesheets.
>
...
>> It fails at linkmap.html with a long bunch of treeprocessor stuff,
>> and this BROKEN message:
>> URI not found: Type 'xhtml' does not exist for 'map:serialize' at
>> file: PROJECT_HOME/src/documentation/sitemap.xmap:9:34
>
>>
>> You need to define the xhtml serializer used in <map:serialize
>> type="xhtml"/> in the components section of the sitemap.
>>
>> See
>> http://cocoon.apache.org/2.1/userdocs/serializers/xhtml-serializer.html
>> for the elements you need to add to define this component. You can
>> see examples in the FORREST_HOME/main/webapp/sitemap.xmap
>
Excellent, thanks for that. Looks simple enough.
Addi
Re: Need help getting DocBook working
Posted by Ross Gardler <rg...@apache.org>.
Addi wrote:
> I'll preface this with the fact I do not understand sitemaps and while I
> have been trying to wrap my head around it for two days, I have way too
> much other stuff going on to figure them out beyond the basic concept.
> 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.
> I tried following
> the faq (http://forrest.apache.org/0.7/docs/faq.html#docbook) about
> using DocBook but I don't really get it all. I do have Norman Walsh's
> DocBook stylesheets and I put them into
> PROJECT_HOME\src\documentation\resources\stylesheets.
>
> With this sitemap.xmap (just following the example in the faq):
> <?xml version="1.0"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="**wp.html">
> <map:generate src="{project:content.xdocs}{1}wp.xml"/>
> <map:transform
> src="{project:resources.stylesheets}/docbook.xsl"/>
> <map:serialize type="xhtml"/>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> </map:sitemap>
>
> It fails at linkmap.html with a long bunch of treeprocessor stuff, and
> this BROKEN message:
> URI not found: Type 'xhtml' does not exist for 'map:serialize' at file:
> PROJECT_HOME/src/documentation/sitemap.xmap:9:34
You need to define the xhtml serializer used in <map:serialize
type="xhtml"/> in the components section of the sitemap.
See http://cocoon.apache.org/2.1/userdocs/serializers/xhtml-serializer.html
for the elements you need to add to define this component. You can see
examples in the FORREST_HOME/main/webapp/sitemap.xmap.
(I'll add this to the FAQ, thanks for pointing it out)
Ross