[sword-devel] Cross-references module

asrael bergmannmd at web.de
Mon Jun 23 12:28:46 MST 2008



Troy A. Griffitts wrote:
> 
> Dear Manfred,
> 
> Try adding this line to the tsk.conf file:
> 
> LocalOptionFilter=ThMLScripref
> 
> 
Ok. That changed something. :)

The output for "Gen 1:1" with "lookup" tool then is like this (see below).
There are still no crossReference type tags but the refs in body tag are the
cross-references which I can use.

---
Entry Attributes:

[ Footnote ]
	[ 1 ]
		body = 1
		passage = Ge 1:1
		refList = Genesis 1:1
	[ 10 ]
		body = Pr 8:22-24; 16:4; Mr 13:19; Joh 1:1-3; Heb 1:10; 1Jo 1:1
		refList = Proverbs 8:22-Proverbs 8:24; Proverbs 16:4; Mark 13:19; John
1:1-John 1:3; Hebrews 1:10; I John 1:1
	[ 11 ]
		body = Ex 20:11; 31:18; 1Ch 16:26; Ne 9:6; Job 26:13; 38:4; Ps 8:3; 33:6,9
		refList = Exodus 20:11; Exodus 31:18; I Chronicles 16:26; Nehemiah 9:6;
Job 26:13; Job 38:4; Psalms 8:3; Psalms 33:6; Psalms 33:9
	[ 12 ]
		body = Ps 89:11,12; 96:5; 102:25; 104:24,30; 115:15; 121:2; 124:8; 134:3
		refList = Psalms 89:11; Psalms 89:12; Psalms 96:5; Psalms 102:25; Psalms
104:24; Psalms 104:30; Psalms 115:15; Psalms 121:2; Psalms 124:8; Psalms
134:3
	[ 13 ]
		body = Ps 136:5; 146:6; 148:4,5; Pr 3:19; 8:22-30; Ec 12:1; Isa 37:16;
40:26
		refList = Psalms 136:5; Psalms 146:6; Psalms 148:4; Psalms 148:5; Proverbs
3:19; Proverbs 8:22-Proverbs 8:30; Ecclesiastes 12:1; Isaiah 37:16; Isaiah
40:26
	[ 14 ]
		body = Isa 40:28; 42:5; 44:24; 45:18; 51:13,16; 65:17; Jer 10:12; 32:17
		refList = Isaiah 40:28; Isaiah 42:5; Isaiah 44:24; Isaiah 45:18; Isaiah
51:13; Isaiah 51:16; Isaiah 65:17; Jeremiah 10:12; Jeremiah 32:17
	[ 15 ]
		body = Jer 51:15; Zec 12:1; Mt 11:25; Ac 4:24; 14:15; 17:24; Ro 1:19,20
		refList = Jeremiah 51:15; Zechariah 12:1; Matthew 11:25; Acts 4:24; Acts
14:15; Acts 17:24; Romans 1:19; Romans 1:20
	[ 16 ]
		body = Ro 11:36; 1Co 8:6; Eph 3:9; Col 1:16,17; Heb 1:2; 3:4; 11:3; 2Pe
3:5
		refList = Romans 11:36; I Corinthians 8:6; Ephesians 3:9; Colossians 1:16;
Colossians 1:17; Hebrews 1:2; Hebrews 3:4; Hebrews 11:3; II Peter 3:5
	[ 17 ]
		body = Re 3:14; 4:11; 10:6; 14:7; 21:6; 22:13
		refList = Revelation of John 3:14; Revelation of John 4:11; Revelation of
John 10:6; Revelation of John 14:7; Revelation of John 21:6; Revelation of
John 22:13
	[ 2 ]
		body = 3
		passage = Ge 1:3
		refList = Genesis 1:3
	[ 3 ]
		body = 6
		passage = Ge 1:6
		refList = Genesis 1:6
	[ 4 ]
		body = 9
		passage = Ge 1:9
		refList = Genesis 1:9
	[ 5 ]
		body = 14
		passage = Ge 1:14
		refList = Genesis 1:14
	[ 6 ]
		body = 20
		passage = Ge 1:20
		refList = Genesis 1:20
	[ 7 ]
		body = 24
		passage = Ge 1:24
		refList = Genesis 1:24
	[ 8 ]
		body = 26
		passage = Ge 1:26
		refList = Genesis 1:26
	[ 9 ]
		body = 29
		passage = Ge 1:29
		refList = Genesis 1:29
	[ count ]
		value = 17
---

asrael wrote:
> 
> 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-tp18055159p18076510.html
Sent from the SWORD Dev mailing list archive at Nabble.com.




More information about the sword-devel mailing list