Discussion:
nsgmls, where does it store the catalog file
(too old to reply)
Steve Kostecke
2006-06-04 23:17:02 UTC
Permalink
Hi, I found nsgmls, compiled it, but I can't figure out where I'm
supposed to put the catalog file.

Also the "pubtext" directory that contains the DTD and such files seem t
obe out of date (no HTML 4.01) so I found sgml-lib.tar.gz on the w3c
website, which has the newest fiels for HTML 4.01, XHTML and many more,
but how do I set this all up, it's really confusing me (and the irony is
I'm usually good with setting things up on my linux box.)

From sgml-lib.tar.gz I have this structure:

$ ls -la validator-0.7.2/htdocs/sgml-lib
total 771
drwxr-xr-x 1 root root 4096 Jun 4 12:27 .
drwxr-xr-x 1 root root 4096 Jun 4 12:27 ..
drwxr-xr-x 1 root root 4096 Jun 4 12:27 IETF
drwxr-xr-x 1 root root 4096 Jun 4 12:27 ISO-HTML
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-html32-19970114
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-html401-19991224
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-html40-19980424
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-MathML2-20031021
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-smil-19980615
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-smil20-20050107
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-SVG11-20030114
drwxr-xr-x 1 root root 4096 Jun 4 12:27 REC-SVG-20010904
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-xhtml11-20010531
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-xhtml1-20020801
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-xhtml-basic-20001219
-rwxr-xr-x 1 root root 2554 May 24 2003 sgml.dcl
-rwxr-xr-x 1 root root 45425 Feb 4 2005 sgml.dtd
-rwxr-xr-x 1 root root 3301 Jul 25 2005 sgml.soc
-rwxr-xr-x 1 root root 57287 Aug 19 2002 spec.dtd
-rwxr-xr-x 1 root root 573471 Mar 29 2005
xhtml-math-svg-flat-20020809.dtd
-rwxr-xr-x 1 root root 7219 Sep 9 2004 xml.dcl
-rwxr-xr-x 1 root root 32283 Feb 4 2005 xml.dtd
-rwxr-xr-x 1 root root 3872 May 9 2005 xml.soc

$ ls -la validator-0.7.2/htdocs/sgml-lib/REC-html40-19980424
total 123
drwxr-xr-x 1 root root 4096 Jun 4 12:27 .
drwxr-xr-x 1 root root 4096 Jun 4 12:27 ..
-rwxr-xr-x 1 root root 1007 Sep 4 1999 frameset.dtd
-rwxr-xr-x 1 root root 347 Sep 4 1999 HTML4.cat
-rwxr-xr-x 1 root root 2551 Oct 28 1999 HTML4.decl
-rwxr-xr-x 1 root root 11961 Sep 4 1999 HTMLlat1.ent
-rwxr-xr-x 1 root root 4116 Sep 4 1999 HTMLspecial.ent
-rwxr-xr-x 1 root root 14445 Sep 4 1999 HTMLsymbol.ent
-rwxr-xr-x 1 root root 45728 Sep 4 1999 loose.dtd
-rwxr-xr-x 1 root root 34952 Sep 4 1999 strict.dtd

How can I setup nsgmls so that it always uses the right file, ie,
mapping

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

to the local strict.dtd (in the REC-html40-19980424 dir above) ?

I also noticed that HTML4.cat is the same format a the HTML4.soc in the
pubtext directory that comes wit hthe nsgml source code. Note sure if
that helps or not.

I'm just not sure what to do here, thanks for any help on this. I just
want to verify my html and xml documents on my machine.
Peter Flynn
2006-06-04 23:45:49 UTC
Permalink
Post by Steve Kostecke
Hi, I found nsgmls, compiled it, but I can't figure out where I'm
supposed to put the catalog file.
Traditionally in /usr/local/lib/sgml/CATALOG
But anywhere you want if you use the -c option.
Post by Steve Kostecke
Also the "pubtext" directory that contains the DTD and such files seem t
obe out of date (no HTML 4.01) so I found sgml-lib.tar.gz on the w3c
website, which has the newest fiels for HTML 4.01, XHTML and many more,
but how do I set this all up, it's really confusing me (and the irony is
I'm usually good with setting things up on my linux box.)
See ยง2.5 of my book on SGML and XML Tools [1] which explains this.
Post by Steve Kostecke
$ ls -la validator-0.7.2/htdocs/sgml-lib
total 771
drwxr-xr-x 1 root root 4096 Jun 4 12:27 .
drwxr-xr-x 1 root root 4096 Jun 4 12:27 ..
drwxr-xr-x 1 root root 4096 Jun 4 12:27 IETF
drwxr-xr-x 1 root root 4096 Jun 4 12:27 ISO-HTML
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-html32-19970114
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-html401-19991224
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-html40-19980424
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-MathML2-20031021
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-smil-19980615
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-smil20-20050107
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-SVG11-20030114
drwxr-xr-x 1 root root 4096 Jun 4 12:27 REC-SVG-20010904
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-xhtml11-20010531
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-xhtml1-20020801
drwxr-xr-x 1 root root 4096 Jun 4 12:27
REC-xhtml-basic-20001219
-rwxr-xr-x 1 root root 2554 May 24 2003 sgml.dcl
-rwxr-xr-x 1 root root 45425 Feb 4 2005 sgml.dtd
-rwxr-xr-x 1 root root 3301 Jul 25 2005 sgml.soc
-rwxr-xr-x 1 root root 57287 Aug 19 2002 spec.dtd
-rwxr-xr-x 1 root root 573471 Mar 29 2005
xhtml-math-svg-flat-20020809.dtd
-rwxr-xr-x 1 root root 7219 Sep 9 2004 xml.dcl
-rwxr-xr-x 1 root root 32283 Feb 4 2005 xml.dtd
-rwxr-xr-x 1 root root 3872 May 9 2005 xml.soc
$ ls -la validator-0.7.2/htdocs/sgml-lib/REC-html40-19980424
total 123
drwxr-xr-x 1 root root 4096 Jun 4 12:27 .
drwxr-xr-x 1 root root 4096 Jun 4 12:27 ..
-rwxr-xr-x 1 root root 1007 Sep 4 1999 frameset.dtd
-rwxr-xr-x 1 root root 347 Sep 4 1999 HTML4.cat
-rwxr-xr-x 1 root root 2551 Oct 28 1999 HTML4.decl
-rwxr-xr-x 1 root root 11961 Sep 4 1999 HTMLlat1.ent
-rwxr-xr-x 1 root root 4116 Sep 4 1999 HTMLspecial.ent
-rwxr-xr-x 1 root root 14445 Sep 4 1999 HTMLsymbol.ent
-rwxr-xr-x 1 root root 45728 Sep 4 1999 loose.dtd
-rwxr-xr-x 1 root root 34952 Sep 4 1999 strict.dtd
How can I setup nsgmls so that it always uses the right file, ie,
mapping
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
to the local strict.dtd (in the REC-html40-19980424 dir above) ?
In your catalog file:

PUBLIC "-//W3C//DTD HTML 4.01//EN"
"/whatever/validator-0.7.2/htdocs/sgml-lib/REC-html40-19980424/strict.dtd"

plus similar entries to resolve the .ent files.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
[Followups trimmed to c.t.s]
[1] Understanding SGML and XML Tools, Kluwer, 1998, 0-7923-8169-6
Nick Kew
2006-06-05 01:28:08 UTC
Permalink
Post by Steve Kostecke
Hi, I found nsgmls, compiled it, but I can't figure out where I'm
supposed to put the catalog file.
-rwxr-xr-x 1 root root 3301 Jul 25 2005 sgml.soc
-rwxr-xr-x 1 root root 3872 May 9 2005 xml.soc
That looks like a good start.

Alternatively you can build something more extensive. If you download
a validator package, it'll have one. Or you could build it yourself
with http://valet.webthing.com/catalogue/
--
Nick Kew
Steve Kostecke
2006-06-05 02:28:31 UTC
Permalink
Post by Nick Kew
Post by Steve Kostecke
Hi, I found nsgmls, compiled it, but I can't figure out where I'm
supposed to put the catalog file.
-rwxr-xr-x 1 root root 3301 Jul 25 2005 sgml.soc
-rwxr-xr-x 1 root root 3872 May 9 2005 xml.soc
That looks like a good start.
Alternatively you can build something more extensive. If you download
a validator package, it'll have one. Or you could build it yourself
with http://valet.webthing.com/catalogue/
Than kyou ,but what I was really after was _where_ to put the global
catalog file so that it's always used by default, this is what confuses
me. I've seen references in some of the docs I read about havign a
catalog file, and many seemed to imply there was a global (on your
system) catalog file you setup, but not very clear.
N. Raghavendra
2006-06-05 07:06:42 UTC
Permalink
Post by Steve Kostecke
Than kyou ,but what I was really after was _where_ to put the global
catalog file so that it's always used by default, this is what
confuses me. I've seen references in some of the docs I read about
havign a catalog file, and many seemed to imply there was a global
(on your system) catalog file you setup, but not very clear.
You could have a "global catalog", say `/usr/local/etc/sgml/catalog',
containing pointers to other catalogs, like so:

-- /usr/local/etc/sgml/catalog ... main SGML catalog --

CATALOG "/usr/local/opt/share/sgml/openjade/catalog"
CATALOG "/usr/local/opt/share/sgml/entities-iso-8879-1986/catalog"
CATALOG "/usr/local/opt/share/sgml/docbook/dtd/4.2/docbook.cat"
CATALOG "/usr/local/opt/share/sgml/docbook/dsssl/1.78/catalog"
CATALOG "/usr/local/opt/share/sgml/docbook/dsssl/1.78/common/catalog"
CATALOG "/usr/local/opt/share/sgml/html/iso-iec-15445-2000/catalog"
CATALOG "/usr/local/opt/share/sgml/html/w3c-4.01/HTML4.cat"
CATALOG "/usr/local/opt/share/sgml/html/w3c-4.0/HTML4.cat"

-- catalog ends here --

Having done that, you can set the environment variable
SGML_CATALOG_FILES to `/usr/local/etc/sgml/catalog', to tell `nsgmls'
to use the global catalog.

Raghavendra.
--
N. Raghavendra <***@mri.ernet.in> | See message headers for contact
Harish-Chandra Research Institute | and OpenPGP details.
Nick Kew
2006-06-05 08:09:31 UTC
Permalink
Post by Steve Kostecke
Than kyou ,but what I was really after was _where_ to put the global
catalog file so that it's always used by default,
At SGML_CATALOG_FILES.

If you work with different SGMLDECLs, you'll also need more
than one catalogue. Unless you come up with something clever:-)
--
Nick Kew
Loading...