In this section, we present the simplest OMF file which obeys the OMF scheme and which allows ScrollKeeper 0.3.5 to properly function. Note that while the OMF is not XML-specific, ScrollKeeper requires that OMF files be in XML.
Here is an example of the most minimal OMF file, containing metadata for only one document:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE omf PUBLIC "-//OMF//DTD Scrollkeeper OMF Variant V1.0//EN" "http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd"> <omf> <resource> <creator> email@example.com (Kenny Graunke) </creator> <title> Gfloppy Manual </title> <date> 2001-11-23 </date> <subject category="GNOME|Core Desktop"/> <format mime="text/xml"/> <identifier url="file://usr/share/doc/gfloppy/gfloppy.xml"/> <language code="C"/> <relation seriesid="01ddeea4-0a42-11d6-9cf9-ee43c422358d"/> </resource> </omf>
All OMF files which are to be used with ScrollKeeper should have all of these elements. Make sure that the category is valid, chosen from the controlled list. The seriesid should be unique from all other documents except different versions, locales, or formats of the same document.
Multiple documents can be described in a single OMF file by placing multiple "resource" objects in the file.
Note that the URL is typically not known until build or install time. Thus, a placeholder or estimated location is often used in the original OMF file. When the package is built, the correct file location is automatically substituted into the OMF file using scrollkeeper-preinstall.
Note that you should always include the document's encoding in the XML declaration since there is no good way to detect a document's encoding. ScrollKeeper uses the libxml libraries, which supports the following encodings: UTF-8, UTF-16, ISO-8859-1 (ISO-Latin-1), ASCII, HTML. For more information, see Libxml Encoding Support Web Pages.