OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK: 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/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC