Subject: Re: [docbook] Tool to convert a Docbook xml format to sgml format?
On 13/01/11 18:36, Csanyi Pal wrote: > Hi, > > I have downloaded a Docbook that is in xml format. > I wish to convert it into sgml format. > Are there any tool for this? I'm not aware of one. The first thing I'd try is to run the file through osgmlnorm (part of the OpenSP/Jade package): $ osgmlnorm -wxml xml.dec yourfile.xml When I tried this on the following (XML) document instance <?xml version="1.0"?> <!DOCTYPE foo [ <!ELEMENT foo (bar,blort)> <!ELEMENT bar EMPTY> <!ATTLIST bar stuff CDATA #IMPLIED> <!ELEMENT blort (#PCDATA)> ]> <foo> <bar stuff="splat"/> <blort>Test</blort> </foo> I got the document with the NET replaced by a TAGC: $ osgmlnorm -wxml /usr/share/xml/declaration/xml.dcl test.xml osgmlnorm:/usr/share/xml/declaration/xml.dcl:1:W: SGML declaration was not implied <foo> <bar stuff="splat"> <blort>Test</blort> </foo> ///Peter