[sword-devel] Cross-references module
asrael
bergmannmd at web.de
Mon Jun 23 11:49:01 MST 2008
Troy A. Griffitts wrote:
>
> Manfred,
>
> You can get all the xrefs from an entry by grabbing the note type xref
> entry attributes. Have a look at sword/examples/cmdline/lookup.cpp Run
> it on the ESV like this:
>
> ./lookup ESV jn1.1
>
> it dynamically iterates the entry attributes. You'll see how the xrefs
> are stored. Once you know what attributes you want, you don't have to
> use the dynamic code, it's easier to just use something like:
>
> SWBuf fnNumber;
> int i = 1;
> while (true) {
> fnNumber.setFormatted("%d", i);
> SWBuf type =
> module->getEntryAttributes()["Footnote"][fnNumber]["type"];
> if (!type.length()) break;
> if (type == "crossReference") {
> SWBuf refList =
> module->getEntryAttributes()["Footnote"][fnNumber]["refList"];
> }
> }
>
> That should do it. You might have to add a little more error checking,
> in case no footnotes at all exist for an entry, but should give you what
> you want.
>
>
Hi Troy.
You are refering to modules that have xrefs encoded?
I used the 'lookup' tool with the TSK module but it seems it doesn't have
crossReference tags.
Well, quite understandable, this module is a collection of xrefs.
But it also contains a lot of text which I can't use and display for none
english speakers.
So I would like to pull out the cross-reference keys only but how to
distinguish between a reference in a comment/text and the real
cross-references in this module.
Maybe it would be best to do that at module source level but I'm not sure.
IMO cross-references not necessarily need to be encoded in the bible module
itself. It doesn't help me if some have cross-references and some don't. For
bible study I need cross-refs everywhere for every module no matter which
language and for which country it is. In my understanding cross-references
are not bible translation specific and thus not module specific.
One good source for cross-references would be fully sufficient for all bible
modules.
Regards,
Manfred
--
View this message in context: http://www.nabble.com/Cross-references-module-tp18055159p18075712.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
More information about the sword-devel
mailing list