Skip to content

Commit b8d2054

Browse files
committed
(no commit message provided)
1 parent 29dceb9 commit b8d2054

17 files changed

+121300
-25875
lines changed

src/onixcheck/models.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OnixMeta(_BaseMeta):
7070
7171
:param str xml_version: XML Version as str ("1.0").
7272
:param str xml_encoding: XML Encoding as str ("utf-8").
73-
:param str onix_version: Onix Version as string ("2.1" or "3.0")
73+
:param str onix_version: Onix Version as string ("2.1", "3.0", "3.1")
7474
:param str onix_style: Onix Style as str ("short" or "reference")
7575
:param dict namespaces: dict of str with namspaces from the root element
7676
@@ -80,6 +80,8 @@ class OnixMeta(_BaseMeta):
8080
V21 = "2.1"
8181
#: ONIX Version 3.0
8282
V30 = "3.0"
83+
#: ONIX Version 3.1
84+
V31 = "3.1"
8385
#: Short notation
8486
SHORT = "short"
8587
#: Reference notation
@@ -88,7 +90,7 @@ class OnixMeta(_BaseMeta):
8890
XSD = "xsd"
8991
RNG = "rng"
9092

91-
ONIX_VERSIONS = (V21, V30)
93+
ONIX_VERSIONS = (V21, V30, V31)
9294
ONIX_STYLES = (SHORT, REFERENCE)
9395

9496
SCHEMA_MAP = {
@@ -98,6 +100,10 @@ class OnixMeta(_BaseMeta):
98100
(V30, SHORT, RNG): schema.O30_RNG_SHORT,
99101
(V30, REFERENCE, XSD): schema.O30_XSD_REFERENCE,
100102
(V30, REFERENCE, RNG): schema.O30_RNG_REFERENCE,
103+
(V31, SHORT, XSD): schema.O31_XSD_SHORT,
104+
(V31, SHORT, RNG): schema.O31_RNG_SHORT,
105+
(V31, REFERENCE, XSD): schema.O31_XSD_REFERENCE,
106+
(V31, REFERENCE, RNG): schema.O31_RNG_REFERENCE,
101107
}
102108

103109
SCHEMA_TYPE_PARSER_MAP = {

src/onixcheck/schema/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
O30_RNG_SHORT = os.path.join(basedir, "rng3.0", "ONIX_BookProduct_3.0_short.rng")
2121
O30_RNG_REFERENCE = os.path.join(basedir, "rng3.0", "ONIX_BookProduct_3.0_reference.rng")
2222

23+
O31_XSD_SHORT = os.path.join(basedir, "xsd3.1", "ONIX_BookProduct_3.1_short.xsd")
24+
O31_XSD_REFERENCE = os.path.join(basedir, "xsd3.1", "ONIX_BookProduct_3.1_reference.xsd")
25+
26+
O31_RNG_SHORT = os.path.join(basedir, "rng3.1", "ONIX_BookProduct_3.1_short.rng")
27+
O31_RNG_REFERENCE = os.path.join(basedir, "rng3.1", "ONIX_BookProduct_3.1_reference.rng")
28+
2329
GOOGLE_O30_YML_REFERENCE = os.path.join(basedir, "google", "google_onix_30.yaml")
2430

2531
BIBLON_O30_YML_REFERENCE = os.path.join(basedir, "biblon", "biblon_onix_30.yaml")

src/onixcheck/schema/rng3.0/ONIX_BookProduct_3.0_reference.rng

+6,088-6,090
Large diffs are not rendered by default.

src/onixcheck/schema/rng3.0/ONIX_BookProduct_3.0_short.rng

+6,087-6,090
Large diffs are not rendered by default.

src/onixcheck/schema/rng3.0/ONIX_BookProduct_CodeLists.rng

+2,555-1,197
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)