This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

<caution> and <sect2> problem


Hello,

Please point me to the appropriate FAQ if this has been addressed/answered
elsewhere.  Also, if more version info. is needed, please let me know.

I'm experiencing a problem that seems to be a bug, but I can't be sure.
Hopefully someone else will be able to reproduce it.

I'm using RH 7.1, DocBook-utils version 0.6 (jw version 1.1), OpenJade
version "1.3", OpenSP version "1.3.4".  I'm encountering what appears to
be an inconsistency in processing SGML using db2html, db2pdf, and others.
Here is the SGML I'd like to convert:

===
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[]>
<book id="bookname">
<chapter id="chap1">
  <title>Chapter Title</title>

  <sect1 id="sect1">
    <title>Sect1 title</title>

    <sect2 id="sect2">
      <title>Sect2 title</title>
      <para>
      Sect2 text
      </para>
    </sect2>

    <note id="sect1note">
      <title>Note title</title>
      <para>
      Note text
      </para>
    </note>

  </sect1>
</chapter>

</book>
===

I process this with db2html, and get the following output:

output is test
Using catalogs: /etc/sgml/sgml-docbook-4.1.cat
Using stylesheet: /usr/share/sgml/docbook/utils-0.6/docbook-utils.dsl#html
Working on: /home/joel/sgml/test.sgml
jade:/home/joel/sgml/test.sgml:16:24:E: document type does not allow
element "NOTE" here; missing one of "GLOSSARY", "BIBLIOGRAPHY", "INDEX"
start-tag

I've pored over the book on docbook.org, and haven't found why a <note>
isn't allowed within a <sect1>.  It's listed as having <sect1> as one of
its parents, and vice-versa.  Furthermore, if I reorder my SGML slightly:

===
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[]>
<book id="bookname">

<chapter id="chap1">
  <title>Chapter Title</title>
  <sect1 id="sect1">
    <title>Sect1 title</title>

    <note id="sect1note">
      <title>Note title</title>
      <para>
      Note text
      </para>
    </note>

    <sect2 id="sect2">
      <title>Sect2 title</title>
      <para>
      Sect2 text
      </para>
    </sect2>

  </sect1>
</chapter>

</book>
===

thus putting the <note> before the <sect2> tag, everything renders just
fine:

output is test
Using catalogs: /etc/sgml/sgml-docbook-4.1.cat
Using stylesheet: /usr/share/sgml/docbook/utils-0.6/docbook-utils.dsl#html
Working on: /home/joel/sgml/test.sgml
Done.

This isn't a *huge* problem, as my HTML seems to render as I want it to,
even when the error happens.  However, db2pdf fails when trying to render
the first SGML, and I'd like to make pdfs as well.  I have also found that
<caution>, <tip>, <important>, and <warning> also generate this error.

Thanks for wading through this message, and thanks in advance for any
help.  If more info. is needed about anything, please let me know.

-- 
Joel Boonstra
jboonstra@gospelcom.net


------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]