Gary Schnabl wrote:
Frank Peters wrote:
We (Sun docs team) are using OOo for writing the application help
files which are in a simple XML format. Unfortunately, we also
are stuck with version 1.x because we didn't have time to port
the filters and macros to ODF yet.
I wanted to write an article about using OOo for XML editing
and describe the experience I made when setting this up for
application help authoring for a long time, I never got to it.
What might an outline of that article have been?
Of the various uses for XML, what would be the best (or easiest) route
using Writer with importing XML content along with a prepared template
(for a chapter, for example) using DocBook's DTDs and any necessary R/W
rules file? IOW, using OOo for structured authoring of XML content
similar to the manner that FrameMaker uses its structured XML
application approach to structured authoring.
First step is to map Docbook elements to ODF elements or ODF styles.
This can be a tedious task, since Docbook knows so many elements that
need to be mapped to ODF (mostly using styles).
Then create two xsl transformation stylesheets that do the mapping
on import and export.
Then create a template that assigns visual formats to the element
styles.
Although you can be sure to output well-formed xml (otherwise
the transformation would break) you cannot be sure that the
output is also valid Docbook (following the syntactical rules
of Docbook).
You could, however, implement validation using the OOo API but
that can be complicated and would essentially be programming
a Docbook DTD parser in Basic...
So since Docbook is so profuse, using OOo for this XML DTD would
be an ultimate challenge. If you can restrict usage to a limited
subset that would make things easier.
For the application help, the DTD is *much* simpler than Docbook
so the implementation of OOo as XML editor is much more straightforward.
Finally, complexity depends on whether you want round-tripping
or are fine with Docbook export only.
Frank
--
Frank Peters
Documentation Project Co-Lead
The OOo Documentation Project:
SIGN UP - PARTICIPATE - CONTRIBUTE
IT'S FREE! NO OBLIGATIONS!
http://documentation.openoffice.org
http://wiki.services.openoffice.org/wiki/Documentation