[sword-devel] usfm2osis.py and crossreferences
chrislit at crosswire.org
Fri Oct 12 23:41:42 MST 2012
On 10/12/2012 10:53 PM, Peter von Kaehne wrote:
> Currently usfm2osis.py does not produce complete cross references.
> a) It translates the in the \xo tag contained origin reference as a
> <reference type="annotateRef>
> The probably better way in OSIS would be to tack the origin ref as an
> osisRef argument into the surrounding note tag.
> Having said this, it is clear that many real life \xo references
> would require some level of parsing before they could be made a
> proper osisRef. This in turn would require usfm2osis.py to make use
> of the sword bindings etc.
> b) And then of course is the actual xref which requires even more
> parsing prior final composition
> Chris - what is your plan re this? Do you want to include sword into
> the script and let it deal with the parsing? Or do you want me to
> rework xreffix.pl to deal with the different output?
There's a roadmap in usfm2osis.py that includes reference parsing as a
post-1.0 feature. At the present, usfm2osis.py is just a USFM to OSIS
converter. Parsing references from USFM docs is outside that scope since
references in USFM docs are completely unstandardized and the few
facilities made available to allow reference parsing (\toc3) are
I'd like to enable reference parsing (though I don't necessarily believe
it can be done reliably), but I see it as a future feature, along with
things like generating Sword modules directly--without osis2mod.
More information about the sword-devel