discuss: XML setup HOWTO??


Previous by date: 29 Jun 2002 23:20:50 -0000 Re: XML setup HOWTO??, Charles Curley
Next by date: 29 Jun 2002 23:20:50 -0000 Re: XML setup HOWTO??, Tabatha Persad
Previous in thread: 29 Jun 2002 23:20:50 -0000 Re: XML setup HOWTO??, Charles Curley
Next in thread: 29 Jun 2002 23:20:50 -0000 Re: XML setup HOWTO??, Tabatha Persad

Subject: Re: XML setup HOWTO??
From: Charles Curley ####@####.####
Date: 29 Jun 2002 23:20:50 -0000
Message-Id: <20020629171948.K21070@trib.com>

On Sat, Jun 29, 2002 at 03:39:41PM -0400, Tabatha Persad wrote:
> On Saturday 29 June 2002 17:38, Charles Curley wrote:
> > I've added that, and the thing now compiles and generates output.
> > It still produces a lot of errors. However, I do not have a line
> > analogous to:
> >
> > CATALOG "/usr/local/sgml/docbook/4.1.2xml/catalog"
> >
> > in my catalog, for the simple reason that I don't have an analogous
> > catalog.
> >
> > This comes back to the question I asked earlier: where do I get the
> > 4.1.2xml DTD? I went back to OASIS to see if I could find the DTD
> > again, and this time I found it, at
> > http://www.oasis-open.org/committees/docbook/xml/4.1.2/index.shtml.
> >
> > I now have that unzipped at /usr/share/sgml/docbook/4.1.2xml, to be
> > consistent with the SGML DTDs.
> >
> > The catalog is not named somethin obvious and useful, like
> > "catalog". It is named "docbook.cat." AAARRRGGGHHHHH!!!!!!!
> 
> You know, I compared Oasis' files with the files in my directory, and 
> I know I used Jim Weller's howto, which pointed to Oasis for the 
> files.  Although I do have a docbook.cat, the directory also contains 
> a good old fashioned "catalog" file, which my master catalog 
> currently points to.

Which, according to the tar file of your directory, is a link to
docbook.cat. So either one should do.


> 
> > So I added "CATALOG /usr/share/sgml/docbook/4.1.2xml/docbook.cat"
> > to my master catalog. I now get fewer errors.
> >
> > In /etc/sgml I have a catalog for each of the SGML DTDs I have. So
> > I created one for the XML DTD, called xml-docbook-4.1.2.cat
> >
> > My master catalog now looks like this:
> >
> >
> > CATALOG /etc/sgml/sgml-docbook-3.0.cat
> > CATALOG /etc/sgml/sgml-docbook-3.1.cat
> > CATALOG /etc/sgml/sgml-docbook-4.0.cat
> > CATALOG /etc/sgml/sgml-docbook-4.1.cat
> > CATALOG /etc/sgml/xml-docbook-4.1.2.cat
> > SYSTEM "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
> 
> In my /usr/local/sgml/docbook/4.1.2xml directory, it's called 
> docbook.cat, not docbook-4.1.2.cat but as long as the filenames and 
> paths are consistent what you have really should be fine.  However, 
> read on for a moment.

The line "CATALOG /etc/sgml/xml-docbook-4.1.2.cat" points to file
below. It appears I have a level of indirection you don't have.


> 
> > xml-docbook-4.1.2.cat looks like this:
> >
> > CATALOG /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
> > CATALOG /usr/share/sgml/docbook/4.1.2xml/docbook.cat
> > CATALOG /usr/share/sgml/openjade-1.3/catalog
> > CATALOG /usr/share/sgml/docbook/dsssl-stylesheets-1.64/catalog
> 
> In the above file you are pointing to 4.1.2xml/docbook.cat, but if 
> you read on maybe I can help.  
> 
> I created a tar.gz file for you of my XML 4.1.2 directory, which 
> contains all my files, including the "catalog" file for xml 4.1.2.  
> There shouldn't be any need for tweaking other than to ensure the 
> paths are correct, and that in your master catalog file you refer to 
> catalog instead of docbook.cat for that entry.

Got it. I checked it against the distribution archive from OASIS. File
names are identical, and all of the few lengths I checke are
identical. So I would say you duplicated the OSAIS distribution. The
only exception is your link between "catalog" and "docbook.cat", which
is a minor detail.

> 
> I've also attached my master catalog so you can take a look.  I 
> figured it would be easier to just send you everything rather than 
> try and reproduce it in email - I hope you don't mind!

What your master catalog told me is that the SYSTEM line you sent me
earlier wasn't complete. I needed this:

"docbook/4.1.2xml/docbookx.dtd" "home/tabatha/tmp/ld2db/ld2db/linuxdoc.dtd"

or, rather, something like it, since I don't use linuxdoc.

Also, I realized that the SYSTEM line is specific to XML, so I moved
it into the xml catalog. That may have been a mistake, as I expect
there will move versions of docbook, and I'll have to remember to copy
it.

Anyway, my master catalog now looks like:

CATALOG /etc/sgml/sgml-docbook-3.0.cat
CATALOG /etc/sgml/sgml-docbook-3.1.cat
CATALOG /etc/sgml/sgml-docbook-4.0.cat
CATALOG /etc/sgml/sgml-docbook-4.1.cat
CATALOG /etc/sgml/xml-docbook-4.1.2.cat

and the xml catalog, /etc/sgml/xml-docbook-4.1.2.cat:

CATALOG /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
CATALOG /usr/share/sgml/docbook/4.1.2xml/docbook.cat
CATALOG /usr/share/sgml/openjade-1.3/catalog
CATALOG /usr/share/sgml/docbook/dsssl-stylesheets-1.64/catalog
SYSTEM "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" "/usr/share/sgml/docbook/4.1.2xml/docbookx.dtd"

That got rid of all the errors when I generate HTML. Now to see if I
can get a makefile working & try other formats.

Also, I now find I can leave the URL system identifier in place, and I
still get the local DTD, which is fine with me.


-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://w3.trib.com/~ccurley     / \    No M$ Word docs in email

--> -->
 
 
<type 'exceptions.IOError'>
Python 2.5.2: /usr/bin/python
Wed Jul 3 16:53:12 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /opt/ezmlm-browse-0.20/<string> in ()
 /opt/ezmlm-browse-0.20/main.py in main()
  424 
  425         if path is not None:
  426                 main_path(path)
  427         else:
  428                 main_form()
global main_form = <function main_form at 0x849ec6c>
 /opt/ezmlm-browse-0.20/main.py in main_form()
  378         except ImportError:
  379                 die(ctxt, "Invalid command")
  380         module.do(ctxt)
  381 
  382 def main():
module = <module 'commands.showmsg' from '/opt/ezmlm-browse-0.20/commands/showmsg.pyc'>, module.do = <function do at 0x84b341c>, global ctxt = {'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}
 /opt/ezmlm-browse-0.20/commands/showmsg.py in do(ctxt={'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'})
   18         write(html('msg-pager') % ctxt)
   19         write('<hr>')
   20         sub_showmsg(ctxt, ctxt[MSGNUM])
   21         write('<hr>')
   22         write(html('msg-pager') % ctxt)
global sub_showmsg = <function sub_showmsg at 0x849e1ec>, ctxt = {'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, global MSGNUM = 'msgnum'
 /opt/ezmlm-browse-0.20/globalfns.py in sub_showmsg(ctxt={'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msgnum=3300)
  229         format_timestamp(ctxt, ctxt)
  230         write(html('msg-header') % ctxt)
  231         rec_showpart(ctxt, msg, 0)
  232         write(html('msg-footer') % ctxt)
  233         ctxt.pop()
global rec_showpart = <function rec_showpart at 0x849e1b4>, ctxt = {'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msg = <email.message.Message instance at 0x8512e2c>
 /opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x8512e2c>, partnum=1)
  205                 else:
  206                         for p in part.get_payload():
  207                                 partnum = rec_showpart(ctxt, p, partnum+1)
  208         else:
  209                 write(html('msg-sep') % ctxt)
partnum = 1, global rec_showpart = <function rec_showpart at 0x849e1b4>, ctxt = {'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, p = <email.message.Message instance at 0x85171ac>
 /opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x85171ac>, partnum=2)
  208         else:
  209                 write(html('msg-sep') % ctxt)
  210                 sub_showpart(ctxt, part)
  211         return partnum
  212 
global sub_showpart = <function sub_showpart at 0x849e144>, ctxt = {'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part = <email.message.Message instance at 0x85171ac>
 /opt/ezmlm-browse-0.20/globalfns.py in sub_showpart(ctxt={'cmd': 'showmsg', 'threadidx': 11, 'HTTP_X_FORW...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x85171ac>)
  164         type = ctxt[TYPE] = part.get_content_type()
  165         ctxt[FILENAME] = part.get_filename()
  166         template = html('msg-' + type.replace('/', '-'))
  167         if not template:
  168                 template = html('msg-' + type[:type.find('/')])
global template = <function template at 0x8496e9c>, global html = <function html at 0x8496ed4>, type = 'application/pgp-signature', type.replace = <built-in method replace of str object at 0x85159c0>
 /opt/ezmlm-browse-0.20/globalfns.py in html(name='msg-application-pgp-signature')
   40 
   41 def html(name):
   42         return template(name + '.html')
   43 
   44 def xml(name):
global template = <function template at 0x8496e9c>, name = 'msg-application-pgp-signature'
 /opt/ezmlm-browse-0.20/globalfns.py in template(filename='msg-application-pgp-signature.html')
   31         except IOError:
   32                 if not _template_zipfile:
   33                         _template_zipfile = zipfile.ZipFile(sys.argv[0])
   34                 try:
   35                         f = _template_zipfile.open(n).read()
global _template_zipfile = None, global zipfile = <module 'zipfile' from '/usr/lib/python2.5/zipfile.pyc'>, zipfile.ZipFile = <class zipfile.ZipFile at 0x842fa7c>, global sys = <module 'sys' (built-in)>, sys.argv = ['-c', '/opt/ezmlm-browse-0.20']
 /usr/lib/python2.5/zipfile.py in __init__(self=<zipfile.ZipFile instance at 0x84aa34c>, file='-c', mode='r', compression=0, allowZip64=False)
  337             self.filename = file
  338             modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'}
  339             self.fp = open(file, modeDict[mode])
  340         else:
  341             self._filePassed = 1
self = <zipfile.ZipFile instance at 0x84aa34c>, self.fp = None, builtin open = <built-in function open>, file = '-c', modeDict = {'a': 'r+b', 'r': 'rb', 'w': 'wb'}, mode = 'r'

<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '-c'
      args = (2, 'No such file or directory')
      errno = 2
      filename = '-c'
      message = ''
      strerror = 'No such file or directory'