File size: 9,524 Bytes
21626e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
"""Paths and legislation sources for CanLex."""
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent
DATA_DIR = ROOT / "data"
RAW_DIR = DATA_DIR / "raw"
PROCESSED_DIR = DATA_DIR / "processed"

# Justice Laws Website XML sources. Each key is the Justice Laws consolidated
# identifier, used as the XML filename and the local raw/processed filename.
# To add an instrument, add an entry with a verified xml_url.
#
# The Constitution Acts, 1867 to 1982 are intentionally absent: Justice Laws
# publishes them only as HTML/PDF, with no XML version available.
SOURCES = {
    # --- Immigration ---
    "I-2.5": {
        "short": "IRPA", "name": "Immigration and Refugee Protection Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/I-2.5.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/i-2.5/"},
    "SOR-2002-227": {
        "short": "IRPR", "name": "Immigration and Refugee Protection Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2002-227.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2002-227/"},

    # --- Customs & trade ---
    "C-52.6": {
        "short": "Customs Act", "name": "Customs Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C-52.6.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/c-52.6/"},
    "C-54.011": {
        "short": "Customs Tariff", "name": "Customs Tariff", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C-54.011.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/c-54.011/"},
    "S-8.35": {
        "short": "Luxury Tax Act", "name": "Select Luxury Items Tax Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/S-8.35.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/s-8.35/"},

    # --- Criminal & financial crime ---
    "C-46": {
        "short": "Criminal Code", "name": "Criminal Code", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C-46.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/c-46/"},
    "P-24.501": {
        "short": "PCMLTFA",
        "name": "Proceeds of Crime (Money Laundering) and Terrorist Financing Act",
        "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/P-24.501.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/p-24.501/"},
    "SOR-2002-412": {
        "short": "Cross-border Currency Reporting Regs",
        "name": "Cross-border Currency and Monetary Instruments Reporting Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2002-412.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2002-412/"},
    "S-6.9": {
        "short": "SCIDA", "name": "Security of Canada Information Disclosure Act",
        "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/S-6.9.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/s-6.9/"},

    # --- Controlled substances & cannabis ---
    "C-38.8": {
        "short": "CDSA", "name": "Controlled Drugs and Substances Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C-38.8.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/c-38.8/"},
    "SOR-97-234": {
        "short": "CDSA Police Enforcement Regs",
        "name": "Controlled Drugs and Substances Act (Police Enforcement) Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-97-234.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-97-234/"},
    "SOR-2000-217": {
        "short": "Benzodiazepines Regs",
        "name": "Benzodiazepines and Other Targeted Substances Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2000-217.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2000-217/"},
    "C.R.C.,_c._1041": {
        "short": "Narcotic Control Regs", "name": "Narcotic Control Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C.R.C.%2C_c._1041.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/C.R.C.%2C_c._1041/"},
    "SOR-2012-230": {
        "short": "New Classes of Practitioners Regs",
        "name": "New Classes of Practitioners Regulations", "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2012-230.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2012-230/"},
    "SOR-2002-359": {
        "short": "Precursor Control Regs", "name": "Precursor Control Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2002-359.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2002-359/"},
    "SOR-97-229": {
        "short": "Precursor & Substance Exemption Regs",
        "name": "Regulations Exempting Certain Precursors and Controlled Substances "
                "from the Application of the Controlled Drugs and Substances Act",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-97-229.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-97-229/"},
    "C-24.5": {
        "short": "Cannabis Act", "name": "Cannabis Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C-24.5.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/c-24.5/"},
    "SOR-2018-144": {
        "short": "Cannabis Regs", "name": "Cannabis Regulations", "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2018-144.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2018-144/"},

    # --- Food, health, agriculture ---
    "F-27": {
        "short": "Food and Drugs Act", "name": "Food and Drugs Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/F-27.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/f-27/"},
    "C.R.C.,_c._870": {
        "short": "Food and Drug Regs", "name": "Food and Drug Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C.R.C.%2C_c._870.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/C.R.C.%2C_c._870/"},
    "H-3.3": {
        "short": "Health of Animals Act", "name": "Health of Animals Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/H-3.3.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/h-3.3/"},
    "C.R.C.,_c._296": {
        "short": "Health of Animals Regs", "name": "Health of Animals Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/C.R.C.%2C_c._296.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/C.R.C.%2C_c._296/"},
    "P-14.8": {
        "short": "Plant Protection Act", "name": "Plant Protection Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/P-14.8.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/p-14.8/"},
    "SOR-95-212": {
        "short": "Plant Protection Regs", "name": "Plant Protection Regulations",
        "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-95-212.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-95-212/"},
    "SOR-2018-108": {
        "short": "Safe Food for Canadians Regs",
        "name": "Safe Food for Canadians Regulations", "kind": "regulation",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/SOR-2018-108.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/regulations/SOR-2018-108/"},
    "A-8.8": {
        "short": "AAAMPA",
        "name": "Agriculture and Agri-Food Administrative Monetary Penalties Act",
        "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/A-8.8.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/a-8.8/"},
    "Q-1.1": {
        "short": "Quarantine Act", "name": "Quarantine Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/Q-1.1.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/q-1.1/"},

    # --- Labour & public service ---
    "L-2": {
        "short": "Canada Labour Code", "name": "Canada Labour Code", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/L-2.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/l-2/"},
    "P-33.01": {
        "short": "PSEA", "name": "Public Service Employment Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/P-33.01.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/p-33.01/"},
    "P-36": {
        "short": "PSSA", "name": "Public Service Superannuation Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/P-36.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/p-36/"},

    # --- Privacy ---
    "P-21": {
        "short": "Privacy Act", "name": "Privacy Act", "kind": "act",
        "xml_url": "https://laws-lois.justice.gc.ca/eng/XML/P-21.xml",
        "web_base": "https://laws-lois.justice.gc.ca/eng/acts/p-21/"},
}