After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 81456 - OMF file does not validate
OMF file does not validate
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Documentation
1.0.x
Other other
: Urgent normal
: ---
Assigned To: Kevin Breit
Kevin Breit
Depends on:
Blocks:
 
 
Reported: 2002-05-11 11:49 UTC by J.H.M. Dassen (Ray)
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Validating OMF file for the gnumeric manual; needs to be checked. (1.73 KB, text/plain)
2002-05-11 11:54 UTC, J.H.M. Dassen (Ray)
Details

Description J.H.M. Dassen (Ray) 2002-05-11 11:49:58 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.
Comment 1 J.H.M. Dassen (Ray) 2002-05-11 11:54:19 UTC
Created attachment 8383 [details]
Validating OMF file for the gnumeric manual; needs to be checked.
Comment 2 J.H.M. Dassen (Ray) 2002-05-11 11:56:39 UTC
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.
Comment 3 Kevin Breit 2002-05-13 02:03:28 UTC
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
Comment 4 J.H.M. Dassen (Ray) 2002-05-13 06:02:50 UTC
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).
Comment 5 Kevin Breit 2002-05-13 06:07:20 UTC
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?
Comment 6 J.H.M. Dassen (Ray) 2002-05-13 06:46:13 UTC
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.
Comment 7 J.H.M. Dassen (Ray) 2002-05-13 18:11:58 UTC
*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.
Comment 8 J.H.M. Dassen (Ray) 2002-05-13 18:44:20 UTC
FYI: the scrollkeeper bug report is at http://bugs.debian.org/146848 .
Comment 9 Jody Goldberg 2002-05-28 14:47:52 UTC
Lets get this patched for 1.0.7
Comment 10 Kevin Breit 2002-05-29 18:02:14 UTC
How would I fix this?  I don't code?
Comment 11 J.H.M. Dassen (Ray) 2002-05-29 19:15:24 UTC
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).
Comment 12 Jody Goldberg 2002-06-01 21:11:12 UTC
Applied in 1.0.7 and cvs.