[OpenSER-Docs] migrating sgml to xml

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 3 21:46:18 CET 2008


On 03/03/08 22:28, Edson wrote:
> Hi, Dan..
> If the steps that You follow could be applied to all SGML DOC files, then
> what about a script to do the job? I can handle this script, but need
> detailed instructions to follow...
I think the only steps that can be automatized is the removal of the 
sgml header and adding the xml one and changing the extension from sgml 
to xml (there are entities referenced to user, devel and faq files).

For sgml the header was:

<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [

Now for xml should be:

<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"

In sgml was:

<!ENTITY user SYSTEM "dispatcher_user.sgml">
<!ENTITY faq SYSTEM "dispatcher_faq.sgml">

In xml should be:

<!ENTITY user SYSTEM "dispatcher_user.xml">
<!ENTITY faq SYSTEM "dispatcher_faq.xml">

The rest I did were errors and had to be fixed by hand.

However, first we have to wait for Henning to commit the updated version 
following the latest patch you sent. The we can work, having a working 
sgml version.


> Edson
>> -----Original Message-----
>> From: openser-docs-bounces at lists.openser.org [mailto:openser-docs-
>> bounces at lists.openser.org] On Behalf Of Daniel-Constantin Mierla
>> Sent: segunda-feira, 3 de março de 2008 17:21
>> To: openser-docs at lists.openser.org
>> Subject: [OpenSER-Docs] migrating sgml to xml
>> Hello,
>> thinking about migrating to xml from the sgml, I found a good tutorial:
>> http://www.sagehill.net/docbookxsl/index.html
>> Following some guidelines there, I was able to migrate the doc for
>> dispatcher in just few steps:
>> - renamed extension from sgml to xml
>> - changed the header of disptacher.xml to conform xml structure and link
>> to dtd
>> - fixed some bogus entities defined in doc/entities.sgml (I made a local
>> copy to entities.xml)
>> - fixed some unclosed <para> tags in disptacher_user.xml
>> - run this futuristic command (in modules/dispatcher/doc/):
>> xsltproc --stringparam html.stylesheet ../../../doc/docbook.css
>> --stringparam section.autolabel 1 --stringparam
>> section.label.includes.component.label 1 -o dispatcher.html
>> /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl dispatcher.xml
>> - to get the readme txt format:
>> lynx -force_html -dump -nolist -width=72 dispatcher.html >dispatcher.txt
>> I downloaded http://www.openser.org/css/docbook.css in openser/doc/
>> folder, so I got the same look on my local generated html files as for
>> the ones on the openser.org. The extra option now is that each chapter
>> has its own table of content (can be removed via some option, but I
>> didn't dig in more).
>> It was not that painful, but will require some work, when coming to all
>> modules. I propose to add the docbook.css in the openser SVN under doc
>> folder, maybe renamed as "openser-docbook.css". Also, a copy of
>> entities.sgml as entities.xml with the required fixes (the sgml version
>> will be removed once migration is complete).
>> I believe makes no sense to add support for mixed doc sources -- meaning
>> here that some modules have sgml and some xml. If we can sync 3-4
>> people, and split the modules among, we can get the work done in few
>> days. In this case, we will go directly in replacing the generation of
>> html from sgml to xml. Will be useless work to add intermediary support
>> in Makefile and try to detect whether is sgml or xml.
>> Any comment?
>> Cheers,
>> Daniel
>> _______________________________________________
>> Openser-docs mailing list
>> Openser-docs at lists.openser.org
>> http://lists.openser.org/cgi-bin/mailman/listinfo/openser-docs
> _______________________________________________
> Openser-docs mailing list
> Openser-docs at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/openser-docs

More information about the sr-docs mailing list