Re: Handling toplevel docs which don't set an id
- From: Don Scorgie <DonScorgie Blueyonder co uk>
- To: Joe Shaw <joeshaw novell com>
- Cc: gnome-doc-devel-list gnome org
- Subject: Re: Handling toplevel docs which don't set an id
- Date: Fri, 13 Jan 2006 19:30:43 +0000
Hi,
I believe Brent fixed this a few days ago:
2006-01-08 Brent Smith <gnome nextreality net>
* src/yelp-db-pager.c: (db_pager_parse), (walker_walk_xml):
Make yelp autogenerate ids when they are missing on
chunkable elements, fixes #154934
The version in CVS now generates ids for any chunkable elements that
doesn't have one.
Don
On Fri, 2006-01-13 at 14:11 -0500, Joe Shaw wrote:
> Hi,
>
> Most GNOME docbook entries start in the format:
>
> <article id="index" lang="en">
>
> However, most KDE entries start like so:
>
> <book lang="en">
>
> yelp-db-pager already knows about both article and book as "divisions",
> but it does not handle divisions which lack an "id" property well. In
> yelp-xslt-pager.c:xslt_yelp_document(), there is this code:
>
> page_id = xsltEvalAttrValueTemplate (ctxt, inst,
> (const xmlChar *) "href",
> NULL);
> if (page_id == NULL) {
> xsltTransformError (ctxt, NULL, inst,
> _("No href attribute found on yelp:document"));
> /* FIXME: put a real error here */
> error = NULL;
> yelp_pager_error (pager, error);
> goto done;
> }
>
> There are two problems with this: first, page_id will never be NULL. If
> the href is empty, it'll return "" rather than NULL. Secondly, if it
> were NULL, yelp would completely bail out here, and that doesn't "help"
> anybody. Ha Ha.
>
> Probably the better thing to do here is to assume that documents with
> empty ids are probably the toplevel "index". I'm attaching a patch
> which does this.
>
> Please CC me on any replies, I'm not on the list yet.
>
> Thanks,
> Joe
> _______________________________________________
> gnome-doc-devel-list mailing list
> gnome-doc-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-doc-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]