This is the mail archive of the sgml-tools@via.ecp.fr mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Text to SGML tool


Hello all

I have some code I'm willing to pass over to whoever is running any kind of
SGML-tools support. The following attempts to explain what its all about.

I've just spent some time converting a large (500Kb) text document from pure
text to linux-doc SGML.

While I was SGML-ing it someone else was still editing the text, so we
needed a 'non-invasive' way of adding the SGML so the text, so that the pure
text version could move forward while the SGML was being completed, and the
two sets of edits then combined easily. (As an aside, CVS's concurrent
editing was used to make this possible.)

I ended up with a mechanism where various 'hints' are added to the text on
separate lines, and the resultant file then processed by a perl script to
make the final SGML doc. Here's a quick example:

MARKUP: sect
Section Heading

MARKUP: narrative
Here's a sample piece of code:

MARKUP: code
	for (x=1; x < 10; x++) {printf("Count: %d\n", x);}
MARKUP: narrative

More interesting narrative...

A quick "cat file.base|grep -v 'MARKUP'" restores the original text, running
the perl script gives the SGML.

So, was I reinventing the wheel? Is there a place for this in the SGML
community at large?

Cheers
IanC


____________________________________________________________

This message is confidential. It may also be privileged or
otherwise protected by work product immunity or other legal
rules. If you have received it by mistake please let us know
by reply and then delete it from your system; you should not
copy the message or disclose its contents to anyone.
____________________________________________________________



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]