docbook: Thread: Need more than 5 sects in an article ...


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Need more than 5 sects in an article ...
From: Armin Herbert ####@####.####
Date: 5 Jul 2001 13:08:10 -0000
Message-Id: <200107051308.f65D87T32072@lis5.ph-freiburg.de>

Hi,


I've just half-finished an article I wrote using DocBook V4.1. When
parsing it jade says that 'element "SECT6" [is] undefined'. My article
explains every single mouse click the reader has to do, and when I
tried to restructure the document I couldn't manage to stuff it all in
5 sections ..

It's not that I really want to see this depth in the index, but when
reading the article without this heavy structure I myself become
confused..

Is there perhaps a hint you can give me? How can I keep the structure
without changing the DTD?


Thanks in advance,




Armin Herbert
Subject: Re: Need more than 5 sects in an article ...
From: "Greg Ferguson" ####@####.####
Date: 5 Jul 2001 13:22:16 -0000
Message-Id: <10107050913.ZM26626@hoop.timonium.sgi.com>

On Jul 5,  3:08pm, Armin Herbert wrote:
> Subject: Need more than 5 sects in an article ...
> Hi,
>
>
> I've just half-finished an article I wrote using DocBook V4.1. When
> parsing it jade says that 'element "SECT6" [is] undefined'. My article
> explains every single mouse click the reader has to do, and when I
> tried to restructure the document I couldn't manage to stuff it all in
> 5 sections ..
>
> It's not that I really want to see this depth in the index, but when
> reading the article without this heavy structure I myself become
> confused..
>
> Is there perhaps a hint you can give me? How can I keep the structure
> without changing the DTD?

I don't see how this can be done without extending the DTD.

I found an article on XML.com that discusses customizing the
DoocBook DTD  -

   http://www.xml.com/pub/a/1999/10/docbook/index.html

Page 3 of the article actually contains a section entitled
"Adding Elements: Adding a Sect6"  -

   http://www.xml.com/pub/a/1999/10/docbook/index.html?page=3

--
r,
Ferg

Subject: Re: Need more than 5 sects in an article ...
From: ####@####.####
Date: 5 Jul 2001 13:37:23 -0000
Message-Id: <OF6C2ADB86.29AAACD8-ON85256A80.0049D0C9@torolab.ibm.com>

Wow--six nested levels of sections? That's a whole lot of hierarchy--but 
if you don't want to flatten it out, instead of using <sect1>, <sect2>, 
<sect3> you should just be able to use nested <section> elements; here's 
what Norm says in DocBook: TDG (experimental V2.0.1):

Recursive Sections [...] are an alternative to the numbered sections and have unbounded 
depth. 

Another alternative would be to use a <formalpara> element (within which 
you can include a <title> element).

Dan

--------------------------------------------------------------------------------
Dan Scott
Email: ####@####.####

Please respond to "Greg Ferguson" ####@####.#### 
To:     Armin Herbert ####@####.#### ####@####.####
cc: 
Subject:        Re: Need more than 5 sects in an article ...


On Jul 5,  3:08pm, Armin Herbert wrote:
> Subject: Need more than 5 sects in an article ...
> Hi,
>
>
> I've just half-finished an article I wrote using DocBook V4.1. When
> parsing it jade says that 'element "SECT6" [is] undefined'. My article
> explains every single mouse click the reader has to do, and when I
> tried to restructure the document I couldn't manage to stuff it all in
> 5 sections ..
>
> It's not that I really want to see this depth in the index, but when
> reading the article without this heavy structure I myself become
> confused..
>
> Is there perhaps a hint you can give me? How can I keep the structure
> without changing the DTD?

I don't see how this can be done without extending the DTD.

I found an article on XML.com that discusses customizing the
DoocBook DTD  -

   http://www.xml.com/pub/a/1999/10/docbook/index.html

Page 3 of the article actually contains a section entitled
"Adding Elements: Adding a Sect6"  -

   http://www.xml.com/pub/a/1999/10/docbook/index.html?page=3

--
r,
Ferg


_________________________
http://list.linuxdoc.org/



Subject: Re: Need more than 5 sects in an article ...
From: Dan York ####@####.####
Date: 5 Jul 2001 18:23:32 -0000
Message-Id: <20010705142303.L14100@e-smith.com>

Armin,

> I've just half-finished an article I wrote using DocBook V4.1. When
> parsing it jade says that 'element "SECT6" [is] undefined'. My article
> explains every single mouse click the reader has to do, and when I
> tried to restructure the document I couldn't manage to stuff it all in
> 5 sections ..

Are you aware that the <sectx> tags are *structural* tags rather
than *numerical* tags?  By that I mean it sounds to me from your
note like you are trying to have ONLY five sections in your
document... corresponding to <sect1>, <sect2>,... <sect5>.

In DocBook, you are NOT limited to five sections - you can have as
many sections as you want.  You *are* limited to five levels of
DEPTH.  The typical way someone writes a DocBook file is like this
(indentation provided purely for illustration purposes):

  <article>
    <sect1>
       <title>First section</title>
    </sect1>
    <sect1>
       <title>Second section</title>
       <sect2>
          <title>Subsection 1</title>
       </sect2>
       <sect2>
          <title>Subsection 2</title>
       </sect2>
    </sect1>
    <sect1>
       <title>Third section</title>
    </sect1>
    <sect1>
       <title>Fourth section</title>
    </sect1>
    ... and so on...
  </article>

You can keep on having many, many <sect1> blocks inside of your
document. Likewise you can have many, many <sect2> blocks inside
of each <sect1> block.

The way the other sections work is as subsections of a higher
level section.  <sect2> tags are inside of <sect1>, <sect3> inside of
<sect2>, <sect4> inside of <sect3>.  More like a classical outline:

  I.
      A.
      B.
           1.
	   2.
      C.
 II. 
      A.
           1.
	       a.
	       b.
	       c.
	   2.
	   3.
      B.
      C.
III.
 IV.
      A.
      B.

And so on... the <sectx> tags relate to the depth of each tag.  I think in all
the documents I've written, I personally have never needed to use more than a
<sect3>. I don't recall ever using a <sect4> or <sect5>.

Now, if you are really doing something so indepth that you are using five
levels of nesting, then yes, like Greg mentioned, you would have to 
extend the DTD, but I would **strongly** suggest avoiding this.

Did this help?

Dan
	   
-- 
Dan York, Director of Training        ####@####.####
Ph: +1-613-751-4401  Mobile: +1-613-263-4312 Fax: +1-613-564-7739 
e-smith, inc. 150 Metcalfe St., Suite 1500, Ottawa,ON K2P 1P1 Canada
http://www.e-smith.com/            open source, open mind
Subject: Re: Need more than 5 sects in an article ...
From: David Merrill ####@####.####
Date: 6 Jul 2001 03:03:04 -0000
Message-Id: <20010705230239.J12263@lupercalia.net>

On Thu, Jul 05, 2001 at 03:07:45PM +0200, Armin Herbert wrote:
> Hi,
> 
> 
> I've just half-finished an article I wrote using DocBook V4.1. When
> parsing it jade says that 'element "SECT6" [is] undefined'. My article
> explains every single mouse click the reader has to do, and when I
> tried to restructure the document I couldn't manage to stuff it all in
> 5 sections ..
> 
> It's not that I really want to see this depth in the index, but when
> reading the article without this heavy structure I myself become
> confused..
> 
> Is there perhaps a hint you can give me? How can I keep the structure
> without changing the DTD?

Can we see the source? Then we could suggest an approach with more
information than we have now.

-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                   ####@####.####
Collection Editor & Coordinator            http://www.linuxdoc.org

The less time planning, the more time programming.
[<<] [<] Page 1 of 1 [>] [>>]


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.