Possible assistance converting docs to 1.4-happy format



I got stuck with sed, bash, and tr, and gave up and asked the sweet
one for help.

I make no guarantees, but sitting in
ftp://ftp.linux.org.uk/pub/linux/alan/fixdoc.tar.gz
is a file which may help do _some_ of the conversions listed in
John's wonderful changes.sgml file in CVS in order to convert
old docs to 1.4-readiness.

  mkdir Somedirectory
  cd Somedirectory
  ncftpget -F ftp://ftp.linux.org.uk/pub/linux/alan/fixdoc.tar.gz
  tar xvfz fixdoc.tar.gz
  gcc -O2 -Wall -pedantic fixdoc.c -o fixdoc
	(he's showing off here. I think cc -o fixdoc fixdoc.c works as well)
  ./fixdoc "/some/path/to/an/uncoverted/doc.sgml"
	(convert to a real path appropriately)

Admire the comments, errors, or core dumps.

It doesn't do things like grab the current fdl and put it in for you,
but it will 

 *	Force ENTITY to be upper case
 *	Turn CDATA into XML form
 *	Check the id="foo" tags are present and invent them if needed
 *	Check the id tag is an acceptable value and fix it if not


Known bugs include 

 *	The parsing of [] sections within DOCTYPE is a hack
 *	This is not a real SGML/XML parser
 *	On no account show this code to Daniel Veillard
 *	Tags can only be 512 bytes long between < and >. I contend it's
 *		_your_ problem if they are.

Telsa

PS: send bugs to him, not me!
PPS: it checks for % marks and turns them into &percnt too.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]