Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using orefs.py to process a commentary, etc ?? #47

Open
DavidHaslam opened this issue Dec 11, 2017 · 2 comments
Open

Using orefs.py to process a commentary, etc ?? #47

DavidHaslam opened this issue Dec 11, 2017 · 2 comments

Comments

@DavidHaslam
Copy link

Thinking horizontally...

In theory, it should be feasible to adapt orefs.py to process an OSIS file for a work other than a Bible.

e.g. An OSIS commentary, or OSIS general book, or even a dictionary made with OSIS.

For this to be practicable, the osisRef values may need to include as a prefix the osisWork of the Bible being referred to.

OSIS 2.1.1 provides various mechanisms for a default prefix. See page 21.

In OSIS versions through 2.0, specific attributes were provided to set a default work prefix for osisIDs (osisIDWork on the osisText element) and for osisRefs (osisRefWork on the osisText element). These attributes remain available in OSIS 2.1, but a more general defaulting mechanism has been added.

In OSIS version 2.1 and later, the workPrefix element was added to make it possible to specify a default work prefix for the attributes on any element in an OSIS document. The workPrefix element appears at the end of the header, after all the work elements. Any number of workPrefix elements are allowed, each of which sets the default work prefix for a particular attribute on a particular element type. For example:

<workPrefix path="//note/@annotateRef" osisWork="Bible.KJV"/>

This declaration indicates that the default work prefix on all annotateRef attributes of note elements is to be "Bible.KJV". No colon is to be included (the colon is used to separate a work prefix from the rest of a reference when the work prefix is explicit rather than defaulted).

@adyeths
Copy link
Owner

adyeths commented Dec 11, 2017

While it might be possible, orefs is not designed for this purpose. It's intended as a companion to u2o. Process a bible with u2o, then add the osisRef's attributes to that bible using orefs. I suspect it would become very complicated trying to make orefs work for texts other than the bible. And I'm not sure I'm up to that particular task, at least not right now.

@LAfricain
Copy link

@domcorbex write a script to do this kind of job: Ref2osis.awk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants