[mercury-users] Leveraging Perl

Tomas By T.By at dcs.shef.ac.uk
Wed May 2 11:33:01 AEST 2001

Richard A. O'Keefe writes:
> Let me stress that.  The SWI Prolog XML parser is not the world's fastest
> XML parser (although I have reason to believe that it could be about 25%
> faster if a certain interface were turned inside-out).  Thing is, it's
> an ***SGML*** parser, equally at home with RDF and DocBook. [...]

I agree that if it's an SGML parser you want, porting SWI prolog's is
probably a good idea. I missed your statement "not just XML"

But we were discussing parsing a HTML file to look for a name, and
that is the kind of thing I'm using my parser for. I'm vaguely aware
there are syntactic differences between HTML and XML in the
specifications, but given the degree to which actual pages on the web,
and actual browsers people use, follow the specs, all that seems
rather irrelevant...

For the record, my parser does not merely ignore the DTD - it can also
allow unbalanced tags. This, I feel, is a *very* useful feature when
reading real web pages.

> But XML is "how to transfer structured data from one program to another
> when you have never bothered to find out about Lisp"; it is unwritable
> by humans, and except in tiny examples, largely unreadable by humans.
> Its parent meta-notation, SGML, *is* human-writable and human-readable,
> as well as noticably more compact.

You might exaggerate a bit here. I have written non-trivial amounts of
documentation in Docbook, using only XML syntax, and I find that
doable. It's not exactly pretty but neither is SGML.

> With reference to ftp://ftp.dcs.shef.ac.uk/home/tomas/
> my Postscript viewer reports a Postscript error [...]

Sigh. (Thanks for the info)

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list