docbook: Thread: Strange/buggy SGML export using LyX


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Strange/buggy SGML export using LyX
From: Peter Bieringer ####@####.####
Date: 29 Jan 2002 23:01:24 -0000
Message-Id: <113820000.1012345280@localhost>

Hi,

I'm still a little bit new to LDP,LyX and SGML but writing on the
Linux+IPv6-HOWTO I run inbetween now into three problems which I
believe that they aren't my fault.

Used LyX: 1.1.6fix1 on a Red Hat Linux 7.2 system
Template: docbook

$ more /usr/share/lyx/templates/docbook_template.lyx
#This file was created by <jamatos> Fri Sep 24 13:10:52 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team


----
1. problem:

A LyX table is not proper exported in SGML, the colspec tag is not
very well:

Example
  <colspec colname="col0" align="center"/>

and fix:
  - <colspec colname="col0" align="center"/>
  + <colspec colname="col0" align="center">


Ok, done by a selfmade Perl parser now after export


----
2. problem:

LyX sometimes exports left and right quotes which aren't understand
by "nsgmls"

Examples:
 &ldquo;
 &rdquo;

Fix: replace them with &quot;

Ok, done by a selfmade Perl parser now after export


----
3. problem

LyX doesn't "escape" "&" chars in exported URLs, but nsgmls don't
like this:

Example:

 <ulink
url="http://researchcenter.zdnet.com/data/detail?id=1001711171_237&ty
pe=RES&x=120054357">How Long the Aversion to IP Version 6</ulink> -
Review of META Group, Inc., full access needs (free) registration at
META Group, Inc.


Jade checker:

jade:../Linux+IPv6-HOWTO.sgml:4678:78:E: general entity "type" not
defined and no default entity
jade:../Linux+IPv6-HOWTO.sgml:4678:87:E: general entity "x" not
defined and no default entity

fix:

manual replace of "&" with "&amp;"
No idea for an automatic fix, because it's difficult to differ
between standalone "&" and "&" of starting entinites.


Are this problems known?

Are already fixes available (either LyX template or jade)?

TIA,
        Peter


Subject: Re: Strange/buggy SGML export using LyX
From: Gregory Leblanc ####@####.####
Date: 29 Jan 2002 23:11:55 -0000
Message-Id: <1012345890.4250.43.camel@peecee>

On Tue, 2002-01-29 at 15:01, Peter Bieringer wrote:
> 1. problem:
> 
> A LyX table is not proper exported in SGML, the colspec tag is not
> very well:
> 
> Example
>   <colspec colname="col0" align="center"/>
> 
> and fix:
>   - <colspec colname="col0" align="center"/>
>   + <colspec colname="col0" align="center">

LyX is exporting this and claiming that it's SGML?  That's not supported
by the standard SGML DCL.  XML uses that syntax by default.  Weird

> ----
> 2. problem:
> 
> LyX sometimes exports left and right quotes which aren't understand
> by "nsgmls"
> 
> Examples:
>  &ldquo;
>  &rdquo;
> 
> Fix: replace them with &quot;
> 
> Ok, done by a selfmade Perl parser now after export

Uh, those should work in DocBook, as far as I know.  I don't use them to
encapsulate text, instead I use <quote></quote>.  Don't know if LyX has
that capability.  This one warrants more investigation, to see why your
copy of Jade doesn't like those entities.

> ----
> 3. problem
> 
> LyX doesn't "escape" "&" chars in exported URLs, but nsgmls don't
> like this:
> 
> Example:
> 
>  <ulink
> url="http://researchcenter.zdnet.com/data/detail?id=1001711171_237&ty
> pe=RES&x=120054357">How Long the Aversion to IP Version 6</ulink> -
> Review of META Group, Inc., full access needs (free) registration at
> META Group, Inc.
> 
> 
> Jade checker:
> 
> jade:../Linux+IPv6-HOWTO.sgml:4678:78:E: general entity "type" not
> defined and no default entity
> jade:../Linux+IPv6-HOWTO.sgml:4678:87:E: general entity "x" not
> defined and no default entity
> 
> fix:
> 
> manual replace of "&" with "&amp;"
> No idea for an automatic fix, because it's difficult to differ
> between standalone "&" and "&" of starting entinites.

This is something horked in LyX.  Perhaps bug reports to the LyX folks
are in order.  I don't have a good work around though.
	Greg

-- 
Portland, Oregon, USA.

Subject: Re: Strange/buggy SGML export using LyX
From: Charles Curley ####@####.####
Date: 29 Jan 2002 23:24:35 -0000
Message-Id: <20020129162417.M9613@trib.com>

On Wed, Jan 30, 2002 at 12:01:20AM +0100, Peter Bieringer wrote:
> Hi,
> 
> I'm still a little bit new to LDP,LyX and SGML but writing on the
> Linux+IPv6-HOWTO I run inbetween now into three problems which I
> believe that they aren't my fault.
> 
> Used LyX: 1.1.6fix1 on a Red Hat Linux 7.2 system
> Template: docbook
> 

Lyx is up to lyx-1.1.6fix3-3. I had some installation issues on RH
7.1; see the Lyx list archive for the gory details.

I think the problems you desribe are Lyx issues; you might try the Lyx
list.


-- 

		-- C^2

The world's most effective anti-virus software: Linux.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

--> -->
 
 
<type 'exceptions.IOError'>
Python 2.5.2: /usr/bin/python
Sat May 18 21:50:07 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 0x858ac6c>
 /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.showthread' from '/opt/ezmlm-browse-0.20/commands/showthread.pyc'>, module.do = <function do at 0x8594a74>, global ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}
 /opt/ezmlm-browse-0.20/commands/showthread.py in do(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'})
    9         ctxt.update(ezmlm.thread(ctxt[THREADID]))
   10         header(ctxt, 'Thread: ' + ctxt[SUBJECT], 'showthread')
   11         do_list(ctxt, 'msgs', ctxt[MSGSPERPAGE], ctxt[MESSAGES],
   12                         lambda:sub_showmsg(ctxt, ctxt[MSGNUM]))
   13         footer(ctxt)
global sub_showmsg = <function sub_showmsg at 0x858a1ec>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, global MSGNUM = 'msgnum'
 /opt/ezmlm-browse-0.20/globalfns.py in do_list(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, name='msgs', perpage=10, values=[{'author': u'Peter Bieringer', 'authorid': 'jcamcglekdjmkfphopen', 'date': '29 Jan 2002 23:01:24 -0000', 'month': 200201, 'msgnum': 134, 'subject': u'Strange/buggy SGML export using LyX', 'threadid': 'jcdlcehcejejdedgeeph', 'timestamp': 1012345284.0}, {'author': u'Gregory Leblanc', 'authorid': 'piagbcclfpdpkenhojjm', 'date': '29 Jan 2002 23:11:55 -0000', 'month': 200201, 'msgnum': 135, 'subject': u'Re: Strange/buggy SGML export using LyX', 'threadid': 'jcdlcehcejejdedgeeph', 'timestamp': 1012345915.0}, {'author': u'Charles Curley', 'authorid': 'blnflnoieggjgfeejfli', 'date': '29 Jan 2002 23:24:35 -0000', 'month': 200201, 'msgnum': 136, 'subject': u'Re: Strange/buggy SGML export using LyX', 'threadid': 'jcdlcehcejejdedgeeph', 'timestamp': 1012346675.0}, {'author': u'Peter Bieringer', 'authorid': 'jcamcglekdjmkfphopen', 'date': '30 Jan 2002 21:56:23 -0000', 'month': 200201, 'msgnum': 141, 'subject': u'Re: Strange/buggy SGML export using LyX', 'threadid': 'jcdlcehcejejdedgeeph', 'timestamp': 1012427783.0}], peritem=<function <lambda> at 0x8594bfc>)
  128                 write(template % ctxt)
  129                 if peritem:
  130                         peritem()
  131                 ctxt[ROW] += 1
  132 
peritem = <function <lambda> at 0x8594bfc>
 /opt/ezmlm-browse-0.20/commands/showthread.py in ()
    9         ctxt.update(ezmlm.thread(ctxt[THREADID]))
   10         header(ctxt, 'Thread: ' + ctxt[SUBJECT], 'showthread')
   11         do_list(ctxt, 'msgs', ctxt[MSGSPERPAGE], ctxt[MESSAGES],
   12                         lambda:sub_showmsg(ctxt, ctxt[MSGNUM]))
   13         footer(ctxt)
global sub_showmsg = <function sub_showmsg at 0x858a1ec>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, global MSGNUM = 'msgnum'
 /opt/ezmlm-browse-0.20/globalfns.py in sub_showmsg(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msgnum=136)
  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 0x858a1b4>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msg = <email.message.Message instance at 0x85e5e0c>
 /opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x85e5e0c>, 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 0x858a1b4>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, p = <email.message.Message instance at 0x85ec32c>
 /opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x85ec32c>, 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 0x858a144>, ctxt = {'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part = <email.message.Message instance at 0x85ec32c>
 /opt/ezmlm-browse-0.20/globalfns.py in sub_showpart(ctxt={'HTTP_X_FORWARDED_SERVER': 'glitch', 'HTTP_REFE...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x85ec32c>)
  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 0x8582e9c>, global html = <function html at 0x8582ed4>, type = 'application/pgp-signature', type.replace = <built-in method replace of str object at 0x85ee1a8>
 /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 0x8582e9c>, 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 0x851ba7c>, 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 0x847694c>, 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 0x847694c>, 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'