(Category) (Category) Faq-O-Matic Faq-O-Matic : (Category) Administrators' Guide : (Category) Suggestions :
XML Support
How can you get the structured content of your FAQ out, and into some form other than HTML or text? (See also (Xref) How can I distribute copies of my FAQ?.)

There is an unrefined internal OO API (Item.pm and Part.pm) for manipulating the database of 'items' (questions and answers), but it's not very useful for writing custom scripts, because it depends on the environment to be set up by the web server to access the file store consistently.

There is the seed of a scriptable API in API.pm. It works by making calls through the web server to the existing commands, so that manipulations operate using exactly the same code that handles user requests. It is enough to write scripts that automatically inject mail messages or other bulk data into the FAQ, for example, but it is rather incomplete.

Perhaps the right way to export the data in structured form is as XML, representing the nested item structure either using XML's natural hierarchy, or using a relational representation modeled inside XML. In fact, perhaps XML should someday replace the item file storage representation. Indeed, maybe someday the answers will be delivered to clients as raw XML, using style sheets to map the XML into HTML and text displays. This would make the caching model much simpler. Perhaps FAQ-O-Matic version 3 will be based on XML.

The comments that prompted this idea follow:
Be able to spit out the the data in a directory such that the hierachical info are preserved.
This is an important feature, which will ensure data permanence for those who are concerned. (i.e. what if faq-o-matic goes defunct and a company has lost of hierachical info already installed. By being able to spit out the hierachical info in a stard format (i.e. OS file systems), it gives them assurance. Noboby likes to hack faq-o-matic itself to figure out how it's stored.)
Xah xah@best.com http://www.best.com/~xah/PageTwo_dir/more.html

What you've come up with is a very powerful information-handling tool.

We intend to use it for IAQ (infrequently asked...) as well as flotsa and jetsa arcana which we never can seem to remember when we need it.

On the other hand, the data have to outlive the tool. I note when I ~move~ an entry I get to see the flat-file representation of the data. It's a short step from there (well, it ~is~ for a non-programmer ;^) ).

I save my quibble for a new topic.
David Nelson


(Answer) Export to DocBook XML
[New Answer in "XML Support"]
Next: (Answer) Compact Edit Commands are vague
This document is: http://www.jonh.net/cgi-bin/faqomatic/fom?file=435
[Search] [Appearance] [Show This Entire Category]
This is a Faq-O-Matic 2.718d.
Hosted by SourceForge Logo and jonh.net.