This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: writing a condensed form of docbook
- From: ed nixon <ed dot nixon at lynnparkplace dot org>
- To: "Robert P. J. Day" <rpjday at mindspring dot com>
- Cc: docbook apps list <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 17 Feb 2003 10:36:33 -0500
- Subject: Re: DOCBOOK-APPS: writing a condensed form of docbook
- References: <Pine.LNX.4.44.0302171007070.1741-100000@dell>
- Reply-to: ed dot nixon at lynnparkplace dot org
I was interested to see this item come by last week:
http://www-106.ibm.com/developerworks/library/x-matters24/index.html
Here's a quote from the Abstract:
The document format called reStructuredText has been adopted as one of
the official source formats for Python documentation, but is also useful
for other types of documentation. reStructuredText is an interesting
hybrid of technologies -- in syntax and appearance it is similar to
other "almost-plaintext" formats, but in semantics and API it is very
close to XML. David takes a look at this format and shows you how
existing tools can transform reStructuredText into several XML dialects
(docutils, DocBook, OpenOffice), along with other useful formats like
LaTeX, HTML, and PDF.
It might be worth some of your time.
Regards. ...edN
Robert P. J. Day wrote:
while i know there are numerous XML editors to make one's
life easier, one of my issues is that, in the end, the
docbook that is produced is virtually impossible to scan
(although i'm sure numerous people will tell me that that's
not the point, you're not *supposed* to be able to scan it,
just its transformed output.)
i like to write my documents and manuals in condensed
form, and it would be nice to quickly to go from that to
final docbook.
to that end, one of my techniques was to find 2-letter
abbreviations for almost all of the docbook elements i
used, and create a corresponding emacs abbreviations
file.
that made typing easier, but still left me with unreadable
docbook, so i'm considering writing my stuff in what i'll
call "pidgin" docbook, and having a post-processor (sed
or perl) turn it into real docbook.
as an example, instead of writing
<itemizedlist>
<listitem>
<para>
blah blah
</para>
</listitem>
<listitem>
<para>
woof woof
</para>
</listitem>
</itemizedlist>
i would just write
<il>
<li>
blah blah
</li>
<li>
woof woof
</li>
</il>
or possibly condense it even further, who knows? it would be nice
to be able to write my docbook sort of "stream of consciousness",
throwing out lists and so on, knowing that, when i was done, i could
just run it all thru my post-processor to get the real thing.
i'm sure several people here are gagging at this point, but i
found that using the emacs abbreviations worked pretty well since,
given the subset of docbook elements i was using frequently, i could
assign an intuitive and unique 2-letter abbreviation to almost all
of them, like
il = itemizedlist
ol = orderedlist
li = listitem
em = emphasis
vn = varname
fn = filename
pl = programlisting
sc = screen
and so on.
is there anyone who's tried this? and maybe even wants to
share their post-processor or something i can hack to get this?
it certainly can't be hard -- perl would make short work of this,
don't you think?
comments?
rday