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: DOCBOOK: Re: Am I using DocBook appropriately?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/ Tobias Reif <tobiasreif@pinkjuice.com> was heard to say:
| 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">...

Yes, in the modern world there are several ways to deal with this. A
little Schematron embedded in your RELAX NG would probably be the
easiest way to do it. (The fact that MSV has an extension to do both
at the same time is *way* cool.)

But historically, we relied on DTDs to check and DTDs can't limit recursion.

                                        Be seeing you,
                                          norm

- -- 
Norman Walsh <ndw@nwalsh.com>      | We have fewer friends than we
http://www.oasis-open.org/docbook/ | imagine, but more than we
Chair, DocBook Technical Committee | know.--Hugo Von Hofmannsthal
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE+V5bVOyltUcwYWjsRAoUaAJ9tPgfDYGSLvY3J0wxH+euZCoX00gCgrrtP
fiPw5abLvoUzMWSEDJ6eupE=
=ucq0
-----END PGP SIGNATURE-----


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


Powered by eList eXpress LLC