Docbook Question
I am wading my way into Docbook. I am having problems opening KDE Docbook files in OpenOffice Writer.
I'm using Slackware 12.1, KDE 3.5.9, and OOo 2.4.1.
I copied two KDE Docbook files for experimenting:
1. /usr/doc/HTML/en/kate/index.docbook. The document has a DTD declaration of DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd.
2. /usr/doc/HTML/en/amarok/index.docbook. The document has a DTD declaration of DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd.
When I opened either file in OOo Writer I was prompted to select appropriate ASCII Filter Options. That is, OOo Writer failed to recognize the document as DocBook XML.
How do I remedy this? The OOo Docbook import style sheet is /opt/openoffice.org2.4/share/xslt/docbook/ docbooktosoffheadings.xsl. I don't think I need to edit that file but perhaps I do. Do I need to edit /etc/xml/docbook so OOo knows where to find the KDE DTD schemas?
I added the following to /etc/xml/docbook:
<nextCatalog catalog="/usr/share/apps/ksgmltools2/customization/catalog" />
Same results.
Thinking the problem was in the declaration because the file path to kdex.dtd was incomplete, I modified that text to /usr/share/apps/ksgmltools2/customization/dtd/kdex.dtd.
Same results.
If I edit the document declarations to DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" and change the file extension to xml, then OOo Writer opens the files as Docbook files. Therefore the problem seems resolvable if I can configure OOo to recognize the KDE DTD declarations.
I'm not interested in all the many ways to edit or create Docbook files, or the preferred way to edit KDE Docbook files. I'm interested only in getting OOo Writer to recognize KDE Docbook files. I do not expect to edit KDE Docbook files regularly, and I realize the OOo docbooktosoffheadings.xsl file probably needs a lot of effort to work correctly with KDE Docbook files. At this point I only want the ability to open the files as DocBook files and not raw text.
Thanks again.
|