[XML-SIG] SGML to DOM?

Jeff.Johnson@icn.siemens.com Jeff.Johnson@icn.siemens.com
Wed, 2 Dec 1998 10:11:34 -0500


I was lucky enough to have found SX yesterday and within 20 minutes had a
working solution :)

I haven't tried ESIS yet but my files look really good after I convert them
to HTML so I think everything is working fine.

I do have a small problem with SX.  My files convert well on Win98 but get
truncated on Win NT.  I'll try to figure out what is wrong (maybe an EOF
character?) and if it's a problem with SX I'll send the info to James
Clark.

Thanks for the help from Sean and Andrew!





Sean Mc Grath <digitome@iol.ie> on 12/02/98 08:49:32 AM

To:   xml-sig@python.org
cc:    (bcc: Jeff Johnson/Customer Service/Siemens_Stromberg-Carlson/US)
Subject:  Re: [XML-SIG] SGML to DOM?




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


_______________________________________________
XML-SIG maillist  -  XML-SIG@python.org
http://www.python.org/mailman/listinfo/xml-sig