[XML-SIG] SGML to DOM?

Sean Mc Grath digitome@iol.ie
Wed, 2 Dec 1998 13:49:32 GMT


A couple of ideas for you:-

1) Instead of "save-as" from Adept (and loosing the line feeds you mention)
have you tried converting with James Clarks SX utility?

2) If you generate ESIS (James Clark's nsgmls) you can get into DOM in
Python via
the ESIS builder. There will be ESIS event types in your SGML that are invalid
if your SGML uses features not available in XML. These are easily spotted
owing to the line oriented nature of ESIS.

At 11:05 01/12/98 -0500, you wrote:
>
>
>I sure hope this is a stupid question with an easy answer...
>
>I have a large SGML document that I am converting to HTML and another SGML
>DTD.  For my prototype, I opened the document in ArborText's Adept SGML
>editor and saved it as XML.  This made it well formed and escaped some '<'
>and '>' characters that were not markup.  Unfortunately, it took the line
>feeds out of some pre-formatted text.
>
>I figured that was not a problem because I wanted to have Python read in
>the native SGML anyway.  Then I briefly read the sgmllib docs; the part
>about it not supporting full SGML, just whatever HTML needs.
>
>Could someone tell me if there is a way to read in a non-well formed SGML
>document, with preformatted text into a DOM tree?
>
>Thanks in advance,
>Jeff
>
>
>
>_______________________________________________
>XML-SIG maillist  -  XML-SIG@python.org
>http://www.python.org/mailman/listinfo/xml-sig
>
>
</Sean>
SELUR NOHTYP