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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Am I using DocBook appropriately?


Norman Walsh wrote:


You have to use the sectN hierarchy if you want to control the section
depths used by your authors. For example, you could write a
customization layer that allowed chapters to contain sect1, sect3, and
sect3 but nothing deeper. That would limit authors to three levels of
sections in each chapter. Some publications enforce strict rules about
things like that.

If you allow section to be recursive at all, it's infinitely recursive.


Another way (to control the section depths used by your authors) would be to allow section elements, tell the authors what the max nesting depth is, then use a schema language to check if the rule hasn't been violated by using a schema language which can validate such structural spects (with a customized schema); or by running the doc through a simple XSLT doing partial validation via s.th. like
(rough pseudo code)


  <xsl:if
    test="//section[count(descendant::section)
    &gt;
    $section_nesting_limit]"
    <xsl:message terminate="yes">...

Tobi

--
http://www.pinkjuice.com/


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