Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2722 closed defect (invalid)

Linuxdoc sgml export can not handle long subsections

Reported by: sven@… Owned by: José Matos
Priority: high Milestone:
Component: linuxdoc export Version: 1.4.2
Severity: normal Keywords: patch
Cc:

Description

When you export a document with very long subsection lines you'll get a result
similar to this one:


.....
</abstract><toc><sect>First Section
<sect1>Just added a new long subsection to the template to show where

the html translator stops too soon

</article>


So it seems that there is at least a </sect1> missing to close it. Guess it
should even have a </toc> to close the toc properly.
This leads to a problem if you convert this one to a html document the sgml2html
tools seem to stop the processing after the line break and you end up with a
broken line.

Sven

Attachments (2)

x.diff (442 bytes ) - added by Georg Baum 18 years ago.
fix for 1.5svn
longpara.html (1.0 KB ) - added by sven@… 18 years ago.
Sections stil broken in linuxdoc html export

Download all attachments as: .zip

Change History (10)

by Georg Baum, 18 years ago

Attachment: x.diff added

fix for 1.5svn

comment:1 by Georg Baum, 18 years ago

Keywords: patch added
Milestone: 1.4.x

comment:2 by José Matos, 18 years ago

Component: docbook exportlinuxdoc export

comment:3 by José Matos, 18 years ago

Status: newassigned

Argh, the code is correct Georg.

I hate linuxdoc tools, that is one more bug in those tools.

The segment that you showed is valid linuxdoc SGML. If you read linuxdoc dtd
you will see that for lots of elements the ending tag is optional, <toc> and
<sect*> are some of them.

The linuxdoc tools are without maintainer, and are obsolete. I would really
like to remove support from lyx for 1.5, or something like it.

by sven@…, 18 years ago

Attachment: longpara.html added

Sections stil broken in linuxdoc html export

comment:4 by Georg Baum, 18 years ago

Resolution: invalid
Status: assignedclosed

Well, if the output is valid linuxdoc then this is no LyX problem, so I am
closing this bug as invalid.

comment:5 by sven@…, 18 years ago

According to the linuxdoc tools it's not valid.

$ linuxdoc -B check longpara.sgml-orig
Processing file longpara.sgml-orig
/usr/bin/nsgmls:<OSFD>0:4:2:E: start tag for "TITLE" omitted, but its
declaration does not permit this
/usr/bin/nsgmls:<OSFD>0:4:2:E: no start tag specified for implied empty
element "TITLE"
/usr/bin/nsgmls:<OSFD>0:4:2:E: start tag for "AUTHOR" omitted, but its
declaration does not permit this
/usr/bin/nsgmls:<OSFD>0:4:2:E: no start tag specified for implied empty
element "NAME"
/usr/bin/nsgmls:<OSFD>0:4:2:E: no start tag specified for implied empty
element "AUTHOR"
/usr/bin/nsgmls:<OSFD>0:4:2:E: no start tag specified for implied empty
element "TITLEPAG"
/usr/bin/nsgmls:<OSFD>0:6:10:E: document type does not allow element "TITLE"
here
/usr/bin/nsgmls:<OSFD>0:9:11:E: document type does not allow element "AUTHOR"
here
/usr/bin/nsgmls:<OSFD>0:10:14:E: document type does not allow element "DATE"
here
/usr/bin/nsgmls:<OSFD>0:11:16:E: document type does not allow
element "ABSTRACT" here
/usr/bin/nsgmls:<OSFD>0:12:15:E: document type does not allow element "TOC"
here
/usr/bin/nsgmls:<OSFD>0:13:13:E: document type does not allow element "SECT1"
here

Fixing the last one is quite easy. The </sect> has to be after the
</sect[1-x]>.
--- longpara.sgml-orig 2006-07-31 13:32:49.000000000 +0200
+++ longpara.sgml 2006-07-31 13:43:36.000000000 +0200
@@ -10,8 +10,8 @@

</author><date>DATE
</date><abstract>ABSTRACT
</abstract><toc><sect>First Section

-</sect><sect1>Just added a new long subsection to the template to show where
+<sect1>Just added a new long subsection to the template to show where

the html translator stops too soon

</sect1>

-
-</article>
\ No newline at end of file
+</sect>
+</article>

I couldn't find out how to fix the other ones and to be honest linuxdoc is
_strange_. <toc> for example has no coresponding closing tag as far as I can
tell now. Anyway that doesn't fix the other problems and if you aim at removing
linuxdoc from 1.5.x on I'll tag the bug wontfix in the Debian BTS and let it
rot.

comment:6 by sven@…, 18 years ago

Ok I'm now going away and start to cry. It's definetly the linuxdoc-tools which
are broken. They stop the processing after the first line regardless of what's
after that and ignoring the fact that the <sect1> closes later.

*sigh* I'm feeling sorry for this useless bugreport :(

Sven

comment:7 by José Matos, 18 years ago

*sigh* I'm feeling sorry for this useless bugreport :(

Sven

Don't worry. :-)
It is not the end of the either. ;-)

As you saw the problem is that the tools are broken in several places, and it
is not worth to fix them now.

comment:8 by lasgouttes, 9 years ago

Milestone: 1.4.x

Remove milestone 1.4.x, which is not a real milestone anyway.

Note: See TracTickets for help on using tickets.