forked from Freely-Given-org/BibleOrgSys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BibleBookOrders.ReadMe.txt
60 lines (60 loc) · 4.26 KB
/
BibleBookOrders.ReadMe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# BibleBookOrders.ReadMe.txt
# ReadMe.txt for Bible Book Orders
# Version 0.81
# Last modified: 2011-02-15
#
#
# Abbreviations:
# XML = eXtensible Markup Language -- see http://en.wikipedia.org/wiki/XML
# DTD = Document Type Definition -- see http://en.wikipedia.org/wiki/Document_Type_Definition
# RNG = Relax NG schema (REgular LAnguage for XML Next Generation) -- see http://en.wikipedia.org/wiki/RELAX_NG
# RNC = RNG compact syntax -- see http://en.wikipedia.org/wiki/RELAX_NG#Compact_syntax
# JSON = JavaScript Object Notation -- see http://en.wikipedia.org/wiki/JSON
#
#
# Enclosed are four sets of files:
#
# DataFiles/BookOrders/BibleBookOrder_xxx.xml (where xxx is the name of the book order system)
# A UTF-8 XML file which specifies which book codes are included in a particular publication, and in what order.
# See the comments at the beginning of the file itself for the most up-to-date information on the file contents.
# The file also includes an internal DTD. To validate the XML on Linux systems, use
# xmllint --noout --valid DataFiles/BookOrders/BibleBookOrder_xxx.xml
# (If it gives no output or error messages, then it has validated.)
# The file includes an OSIS style header record. (See PDF file at http://bibletechnologies.net)
# Note though, that we use the xsd:date style with hyphens not with periods as per OSIS.
# Note also that you might have to expand the internal DTD and the Relax NG schema if you add additional fields to the header.
#
# DataFiles/BookOrders/BibleBookOrder.rnc
# A RelaxNG Compact Syntax schema file
# On Linux, to convert to RNG, use
# trang DataFiles/BookOrders/BibleBookOrder.rnc DerivedFiles/BibleBookOrder.rng
# On Linux, to validate against the .rng file, use
# xmllint --noout --relaxng DerivedFiles/BibleBookOrder.rng DataFiles/BookOrders/BibleBookOrder_xxx.xml (where xxx is the name of the book order system)
# or better still, to validate against both this and the internal DTD, use
# xmllint --noout --relaxng DerivedFiles/BibleBookOrder.rng --valid DataFiles/BookOrders/BibleBookOrder_xxx.xml
#
# BibleBookOrders.py (for Python 3)
# This small program will load and do some very basic checking of the XML data file.
# It contains three classes -- the Converter class is not intended to be used by most end-user programs.
# It can be used in a larger Python program to load the XML data into a number of Python dictionaries (with different fields as the key).
# It can also be used to convert and export the XML data directly to Python or C code which can be included in another program as well as JSON format
# (if you don't want to have to supply or validate the master XML file).
# It is expected that the user might want to modify the Python code in order to customize it to your particular needs for either of the above strategies.
# The program is open source with a GPL-3.0 licence.
# If you have Python3 installed on Linux, run the program with ./BibleBookOrders.py --help (once you have made the program file "executable").
# (Alternatively, try: python3 BibleBookOrders.py --help)
# To export the data in other formats, use --export (instead of --help).
# This should load and check the XML file and create BibleBookOrders_Tables.* files in the DerivedFiles folder, suitable for including in other programs.
# If the program is run without any additional parameters, it runs in a demo mode which should show the use of some of the available routines.
#
# Tests/BibleBookOrdersTests.py (for Python 3)
# Running this program from the command line will automatically run tests on the above module, listing tests which fail.
# A result of OK indicates that the tests have all passed.
# If you have Python3 installed on Linux, run the program with Tests/BibleBookOrdersTests.py (once you have made the program file "executable").
# (Alternatively, try: python3 Tests/BibleBookOrdersTests.py)
# Note that although the --help switch works, most of the other displayed options are included for compatibility reasons only, and do not function correctly.
#
#
# Robert Hunt
# Hunt.RobertJ@gmail.com
# February 2011.