<div dir="ltr">Properly coded USFM has the book names for cross references listed in the header info of each book (/toc1, /toc2, /toc3, or /h).  That info, added back to a well formed AV11N, should allow for easy to parse xrefs. <br><br>I haven&#39;t worked on it myself, but it should be easier to deal with digits only to detect the chapter, verse fields than trying to parse separator characters.  That is, your end of number should be a &#39;not digit&#39; [^\d] or [\D] in regex, not a list of separator chars [\:\.\,\-] etc.   The form for xrefs should be target book, target chapternum,  target versenum, (optional target chapter num range), ending verse range. <br><br>What am I missing? <br><div><br></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 31, 2015 at 11:46 AM, Peter Von Kaehne <span dir="ltr">&lt;<a href="mailto:refdoc@gmx.net" target="_blank">refdoc@gmx.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; Von: &quot;Healing Advisor&quot; &lt;<a href="mailto:healingadvisor@gmx.com">healingadvisor@gmx.com</a>&gt;<br>
<span class=""><br>
&gt; On 31/07/15 16:09, Ryan wrote:<br>
&gt;<br>
&gt; &gt; This would be why I haven&#39;t done anything with xrefs. I am sure I don&#39;t<br>
&gt; &gt; possess the knowledge required to handle them properly. :)<br>
&gt;<br>
&gt; In the original, they don&#39;t quite work properly.<br>
<br>
</span>They worked never anywhere. The reason is that the xref content is not ever standardised and needs parsing from very different and variable starting points.<br>
<br>
The current approach with all the scripts was/is to leave them untouched and then use a second script which relies on the Sword library to fix the xrefs.<br>
<br>
I have aa very messy looking script in sword-tools/modules/crossreferences which deals with xrefs and produces valid OSIS. It needs always finetuning for each individual module and is a pain in the neck - but nothing better exists and to be honest, nothing better will likely exist as the variability is a given.<br>
<br>
&quot;Matthew 5:3, John 7:1&quot; in English would be expressed as &quot;Mattheus 5,3; Johannes 7,1&quot; in German. Etc.<br>
<br>
Standardised translations into languages with no history of previous Bible publishing - i.e. much of Wycliffe&#39;s work - tend to be straightforward as at least the punctuation is always the same + carries the same meaning, but languages with a long history of Bible publication and translation will have invariably their very own ways of deploying dots, commas, colons, hyphens and the like and make very individually and variably sense of these.<br>
<span class="HOEnZb"><font color="#888888"><br>
Peter<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</div></div></blockquote></div><br></div>