O Monks, I want to build this CGI app to help teachers work online to build courses. I am grabbing user-entered HTML content chunks into a database. A course module, say, will be stored into a database record. This record will have string or blob fields called name, goals, resources, required-knowledge, and so on. These fields are to contain the HTML provided by users.

The purpose of this app is to allow XML DocBook documents to be generated from the database.

Each of my course module records would result in a DocBook article, each of its columns roughly corresponding to sections or subsections. I'd obviously love to have a free thin-client XML editor, but have to make do with a Javascript HTML editor.

My goal in generating these DocBook files is being able to postprocess them, importing them into some other tool, converting to HTML/PDF, etc. However, I can use advice about this choice as well. Why not input HTML, just print HTML -- because I want to enforce structure over the individual documents. Some versions of the resulting documents will keep some sections, others won't. Some material will be piped into other pieces of machinery. Why DocBook -- It already has a structure known to other tools. I am new to XML, XSLT and the gang. I have a feeling that this is the missing piece to organize the document, but I may be wrong. Why not use a wiki -- I tried! Honest! I selected TWiki which is able to provide structure for content... but something went wonky, and it ate an amount of work massive enough to encourage me to take up this hopefully not too big project.

I know of Class::DBI::AsXML which seems fine for the task of getting a direct XML representation from the database contents. I'd hope to postprocess this XML stuff into DocBook. I want to find a good toolchain for this.

So, my questions are, 1) Does the overall approach seem sane to your wisdom? 2) In either case :), which would be the way to perform raw XML to DocBook conversion from inside the said application? Should I (shudder) write down my XSLT sheet from the ground up or does CPAN hide a spell for me?

Respectfully yours


In reply to Advice on using DocBook for automated document processing? by betacentauri

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.