SGML

Other Reading

SGML Software

Parsers

Misc.

  1. SGML-SPGROVE, another Perl wrapper for (SG|X)ML parsing

sp (nsgml)

Here are some tips on using nsgmls and sp.

nsgmls -c <catalogfile> -s <testfile>

The -s suppresses output. Also, if you juust want to check the dtd, you should also use -p. This parses only the Prolo (ie DTD).

You will need to create a test file in order to parse it. Here's a sample:

<!DOCTYPE BODY PUBLIC "-//Sybase//DTD Search Results//EN" []> <BODY></BODY>

Two things about the DTD:

<!DOCTYPE spec PUBLIC "-//Sybase//DTD Search Results Document Type Declaration//EN" "">

Your FPI is too freakin long. You're going to hate typing that in every doc. I suggest that you leav out Document Type Declaration. First of all, It's actually Document Type DEFINITION (Declaration is something else).

Second, it's not necessary because you already have DTD as the type.

Also, you should be using BODY where you have spec. That is the top most element used in your document instance. Spec is not allowed, because it is not declared at all in your DTD. If you wanted to start with a "smaller" element than body, you could use any element really.

I don't think that second set of quotes is supposed to be there. I've never seen that before, but it could be an XML thing.

Also, maybe the BODY element should really bea called "Searchresults" or something like that. Body is pretty generic.

OK, to make a catalog file, just do the following:

PUBLIC "-//Sybase//DTD Search Results//EN" "/path"

Slam that in a plain text file, and point to it with -c in nsgmls.

Viewers/Browsers

APIs

Last modified: Wed Jun 30 21:02:57 EST 1999