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]
Other format: [Raw text]

Profiling to make a smaller 'book' from a larger one


Hello,

I have a 'book' document (a manual for a software application) which
is approximately 8K lines of XML source.  From the same source I want
to generate a miniature book that deals with only backing up and
restoring the database part of the application.

My first attempt has been to use the 'condition' attribute on
different sections, though my approach seems quite clumsy.  The only
two sections I want are adjacent 'sect4's.  I have done roughly this:

<book condition="fullmanual;upgrademanual">
  <chapter condition="fullmanual">
    <!-- i.e. every chapter not containing the sect4s in question
         is flagged with "fullmanual". -->
  </chapter>

  <chapter condition="fullmanual;upgrademanual">
    <!-- Then the chapter with the upgrade material is flagged with
         both conditions. -->

    <sect1 condition="fullmanual">
      <!-- Every sect not an ancestor of the sect4s in question. -->
    </sect1>

    <sect1 condition="fullmanual;upgrademanual">
      <!-- Every ancestor of the sect4s in question flagged this
           way. -->
      <sect2 condition="fullmanual;upgrademanual">

      <!-- This continues down to the sect4s in question. -->
         <sect4 condition="fullmanual;upgrademanual">
         </sect4>

      </sect2>
    </sect1>
  </chapter>
</book>

The obvious result is that I get all the 'sect*' subheadings that are
ancestors to the 'sect4's that I want.  I have thought of maintaining
the 'sect4's as separate files and including them as entities in the
main book and a skeleton for the miniature book.  For one thing, this
approach would involved converting the document to 'section's to avoid
having to create some empty 'sect*' hierarchy above the 'sect4's in
the smaller book.

Can anyone suggest a more appropriate approach with profiling, or
should I bite the bullet and convert the document to nested 'section's
and move the upgrade information to separate files?


-- 
Paul.

mailto:paulh at logicsquad dot net
mailto:phoadley at maths dot adelaide dot edu dot au


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