I was looking at defaults.cc and I was wondering if
it might be better managing the info as an XML file
and then using that as a basis for generating
defaults.cc and the HTML docs.

The fields are

struct ConfigDefaults
{
   char  *name;          // Name of the attribute
   char  *value;         // Default value
   char  *type;          // Type of the value (string, integer, boolean)
   char  *programs;      // Whitespace separated list of programs/modules 
using this attribute
   char  *block;         // Configuration block this can be used in (can be 
blank)
   char  *version;       // Version that introduced the attribute
   char  *category;      // Attribute category (to split documentation)
   char  *example;       // Example usage of the attribute (HTML)
   char  *description;       // Long description of the attribute (HTML)
};

I can see programming uses for  name, value, type and maybe programs.
I assume all the rest is just for documentation

It would be simple enough to write a perl script that
extracted the necesary fields to create defaults.cc,
that only had what was actually needed for the program,
and then something a bit cleverer written to create the
HTML pages.

( I just noticed the perl script that uses
   defaults.cc to generate the doc pages )

Advantages
   * It would put all the default info into a
     much easier to edit and documentable format
   * It would make it much clearer which values were
     required in the code and which were there
     for documentation.
   * It would reduce the size of the executable by
     about 80000 characters ( 80K or maybe 160 K)

Disadvantages
   * Part of the build process for exexcutabe would require
     perl to exist
   * The current system, be it a bit clunky to my eyes,
     does work, and does solve the problem of trying
     to maintain concurrently the code version and
     the documentation version of the attributes.
   * After rabbiting on like this I now have to decide
     if I willing to put my money where my mouth is.....

Regs

Brian





-------------------------
Brian White
Step Two Designs Pty Ltd
Knowledge Management Consultancy, SGML & XML
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]

Content Management Requirements Toolkit
112 CMS requirements, ready to cut-and-paste




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to