[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: program to restore end tags?

  • From: crism@e... (Christopher R. Maden)
  • To: xml-dev@i...
  • Date: Thu, 25 Nov 1999 00:41:49 -0800

sean chen san francisco
[Sean Chen]
>I really don't want to parse SGML fully, as it's not needed for an
>SGML->XML converter.  I just want to assume concrete syntax, leave the
>entities alone, and the more esoteric SGML documents I might encounter
>I'll fob off to SX or something more industrial strength.

I think you'll have a sort of halting problem, unless you're dealing with a
known set of documents.

For a start, it's really hard to add end-tags without parsing the DTD, so
you're most of the way to a full parser right there.  But you won't know if
the concrete syntax is different unless you parse the SGML declaration; you
won't know what shortrefs may be in effect unless you parse the DTD; you
won't know what could be inside an entity (since SGML doesn't have XML's
guarantee that any entity will be an integer of elements); you won't know
what the value of any marked section keyword parameter entities are unless
you've parsed the DTD; etc.  In other words, I think you'll need a full
SGML parser to know if you need a full SGML parser.

On the other hand, if you're dealing with a set of documents whose complete
geneology you know, then you can work with something smaller.  But SX works
and it's reasonably fast, so unless you're in an embedded processor
environment or something, I don't really see a need to re-invent the wheel.

-Chris

--
Christopher R. Maden, Solutions Architect
Exemplary Technologies
One Embarcadero Center, Ste. 2405
San Francisco, CA 94111



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.