<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Both the \fr and \xo fields serve the
same purposes:<br>
<ol>
<li>Provides a human-readable visual indication of where the
note came from, especially in media like printed pages and
PDFs.</li>
<li>Provides a back-link to the main text where appropriate,
such as in plain HTML where notes are at the end of the
chapter.</li>
</ol>
<p>Note that both fields are entirely redundant in the sense that
they can always be derived from the book, chapter, and verse
where the note or cross reference source is placed.<br>
</p>
Note: the reference checks in the latest versions of Paratext
insist that the verse number in the \fr or \xo field exactly match
the verse number of the verse range, if applicable. In other
words, if the verse in chapter 2 is numbered<br>
\v 1-2 and contains a footnote, the footnote's \fr field would
have to contain "2:1-2". Strictly speaking, \xo and \fr fields are
still optional.<br>
<br>
In the context of a Sword module, the link aspect of the \xo and
\fr fields make no sense, but they could be presented with
different formatting such as color, bold, etc.<br>
<br>
On 01/06/2016 11:09 AM, David Haslam wrote:<br>
</div>
<blockquote cite="mid:1452114557923-4655619.post@n4.nabble.com"
type="cite">
<pre wrap="">Yet another subject arising from working on a copy of u2o.py
Aydeth treated these two markers differently.
\fr is the footnote "origin" reference.
· This is the chapter and verse(s) that note refers to.
\xo is · the cross reference "origin" reference.
· This is the chapter and verse(s) that target reference(s) are being
provided for.
At first sight they appear to be similar in function, except for how SWORD
would handle them after conversion to OSIS and then module.
\fr is converted as one would expect to <reference
type="annotateRef">...</reference>
I see no problems with that. It's the way our own converters already do it.
\xr was converted to plain text, without any reference element. He
commented:
# there is no mapping in the osis manual for the xo usfm tag
# old handling of this tag is commented out.
# r'\xo': ('<reference type="annotateRef">', '</reference>'),
# potential alternate handling of xo and xt...
# r'\xo': ('<reference type="x-anchorRef">', '</reference>'),
# r'\xt': ('<reference type="annotateRef">', '</reference>'),
I added these explanatory comments in the script:
# DFH: that was similar to the handling of \fr in footnotes.
# In the USFM Reference, \fr and \xo have almost identical descriptions.
In their place he had:
r'\xo': ('', ''),
r'\xt': ('<reference>', '</reference>')
I have no substantive issues with how he handles \xt
but I see a weakness in merely leaving \xo as plain text rather than
something else.
Currently, I've changed the handling of \xo in my working script as follows:
# DFH: provisionally marking xo using a seg element because
# we do need something to separate the origin from any non-reference
text
# that might precede the real scripture references in poorly constructed
USFM
r'\xo': ('<seg type="x-origin">', '</seg>'),
This doesn't cause any validation issues (using seg rarely does).
I have added the following comment lines:
# DFH: We ought to implement as documented in the SWORD developers' wiki
#
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/wiki/OSIS_Bibles#Marking_cross-references_notes">http://www.crosswire.org/wiki/OSIS_Bibles#Marking_cross-references_notes</a>
# Example: (in which the ! sub-identifier syntax is used)
# <note type="crossReference" n="t" osisID="Jer.24.7!crossReference.t">
However, I'm not yet competent enough in Python programming to implement
that enhancement.
It's early days still.
Because SWORD handles a properly constucted OSIS cross-reference as a link
to the target passage,
I'm fairly convinced that Aydeth was right in not making the \xo origin
reference into a link too.
Yet that's what our own usfm2osis.pl & usfm2osis.py scripts have always
done, if I'm not mistaken.
Doing so just adds to "link clutter" within the cross-reference note, and
serves no practical purpose.
After all, you already know where you are before you click a cross-reference
link, and afterwards, it's no longer in view.
So when would you ever need to click the origin link?
Does anyone disagree with my analysis?
Someone might ask what I meant by the phrase "poorly constructed USFM" , but
that's more a topic for another day.
Suffice it to say that conceptually we should have separated out these two
stages of postprocessing after USFM to OSIS conversion:
1. Declutter all references and parallel passage headings
2. Fix cross-references and parallel passage headings by making them into
proper OSIS links.
Working on the Welsh Beibl again has shown me how much latitude translators
can take when they are creating \x_...\x* cross-references.
It's not really that they are poorly constructed.
It's rather that what USFM allows is not always neatly convertible to OSIS
without special care.
Best regards,
David
--
View this message in context: <a class="moz-txt-link-freetext" href="http://sword-dev.350566.n4.nabble.com/SFM-to-OSIS-handling-of-the-markers-fr-and-xo-tp4655619.html">http://sword-dev.350566.n4.nabble.com/SFM-to-OSIS-handling-of-the-markers-fr-and-xo-tp4655619.html</a>
Sent from the SWORD Dev mailing list archive at Nabble.com.
_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<p><font color="#000000">Aloha,<br>
<i>Kahunapule Michael Johnson</i></font></p>
<table cellpadding="7" cellspacing="0">
<tbody>
<tr>
<td style="background: rgb(255, 255, 0)"><font
color="#000000"><b>MICHAEL JOHNSON<br>
PO BOX 881143<br>
PUKALANI HI 96788-1143</b><br>
USA</font></td>
<td style="background: rgb(0, 255, 255)"><font
color="#000000">
<a href="http://eBible.org">eBible.org</a><br>
<a href="http://MLJohnson.org">MLJohnson.org</a><br>
Mobile: +1 <b>808-333-6921</b><br>
Skype: kahunapule</font></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>