GNOME Bugzilla – Bug 81456
OMF file does not validate
Last modified: 2004-12-22 21:47:04 UTC
Quoting http://scrollkeeper.sourceforge.net/documentation/writing_scrollkeeper_omf_files/ar01s07.html : "ScrollKeeper 0.3.7 and later will ignore any OMF files which do not validate against the DTD." doc/C/gnumeric-C.omf doesn't validate by far (try "xmllint --noout --dtdvalid /usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd doc/C/gnumeric-C.omf"), so the gnumeric manual doesn't get registered with scrollkeeper.
Created attachment 8383 [details] Validating OMF file for the gnumeric manual; needs to be checked.
The OMF file I attached validates with xmllint, and scrollkeeper-install -v doesn't complain about it in any way, but unfortunately I couldn't get it to generate the catalogue entry.
First, you should upgrade to Scrollkeeper 0.3.8, so then we can all be debugging on the same version (it was released on 04.19.2002) Second, I am getting the following errors: [kbreit@kbreit kbreit]$ xmllint --noout --dtdvalid /usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd work/cvsdir/gnome/gnumeric/doc/C/gnumeric-C.omf Element resource content doesn't follow the DTD Expecting (creator+ , maintainer* , contributor* , title , date , version* , subject* , description? , type* , coverage* , format , identifier , language , relation , source* , rights*), got (title creator subject description type format identifier language ) Element creator was declared #PCDATA but contains non text nodes No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email No declaration for element person No declaration for element firstName No declaration for element lastName No declaration for element email Element subject was declared EMPTY this one has content Element subject doesn't carry attribute category No declaration for element category Document work/cvsdir/gnome/gnumeric/doc/C/gnumeric-C.omf does not validate against /usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd
I'm running Debian's unstable tree, which has scrollkeeper 0.3.8. xmllint gave the same complaints for the OMF file currently in CVS (unknown tags, empty tags containing content etc.). I have attached a proposed update for the OMF file to this bug report. I constructed that file following scrollkeeper's documentation on writing OMF files. xmllint produces no errors or warnings on it, so AFAICT scrollkeeper should work on it. "scrollkeeper-install -v" on it produces no errors or warnings either, but when testing it (following http://scrollkeeper.sourceforge.net/documentation/writing_scrollkeeper_omf_files/ar01s07.html), things don't seem to work: zensunni ray 7:58 /tmp > scrollkeeper-install -v -p testomf_db_dir gnumeric-new.omf Registering gnumeric-new.omf Cannot write to log file: /var/log/scrollkeeper.log : Permission denied zensunni ray 7:58 /tmp > grep -ri gnumeric testomf_db_dir zsh: exit 1 grep -ri gnumeric testomf_db_dir (i.e. there is no catalogue entry generated for the new OMF file).
I am starting to think that while our OMF file maybe wrong, this is more of a Scrollkeeper issue. Why? Simply because we are having issues with stuff missing. This is Gnumeric related, but it seems like it could be in a better component, if not then Scrollkeeper's buglist entirely. Opinions?
It looks like it might be something in scrollkeeper itself indeed. Unfrotunately, I have a train to catch right now, so I can't debug it completely, so this is just a note: scrollkeeper-0.3.8, libs/install.c: 183 if (!xmlValidateDtd(&cvp, omf_doc, dtd)) { 188 xmlFreeDtd(dtd); 190 snprintf(scrollkeeper_docs, PATHLEN, "%s/scrollkeeper_docs", scrollkeeper_dir); 196 for(node = omf_doc->children->children; node != NULL; node = node->next) (gdb) p omf_doc->children $3 = (struct _xmlNode *) 0x806f0a0 (gdb) p omf_doc->children->children $4 = (struct _xmlNode *) 0x0 so the actual heart of the code (adding to scrollkeeper_docs) isn't reached.
*sigh* It appears scrollkeeper doesn't do the right thing with the first comment in the new OMF file (i.e. ignore it) - removing it makes scrollkeeper-install write a proper catalogue entry. I'll file a bug against scrollkeeper for this. Please consider fixing the FIXME and including an updated OMF file in the tree.
FYI: the scrollkeeper bug report is at http://bugs.debian.org/146848 .
Lets get this patched for 1.0.7
How would I fix this? I don't code?
For 1.0.7, you can take the proposed OMF file I attached earlier (which adheres to the documented format for OMF file (and does validate) unlike the current one), strip the comments from it (thus avoiding tripping the bug in scrollkeeper), and check/correct its contents (in particular, the <creator>, <maintainer>, <contributor> tagging which is mostly guesswork on my part).
Applied in 1.0.7 and cvs.