slaw 9.2.0 → 10.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "9.2.0"
2
+ VERSION = "10.4.0"
3
3
  end
@@ -5,73 +5,7 @@ class Nokogiri::XML::Node
5
5
  # Major AN elements such as chapters, parts and sections almost
6
6
  # always have numbers.
7
7
  def num
8
- node = at_xpath('./a:num', a: Slaw::NS)
8
+ node = at_xpath('./a:num', a: Slaw.akn_namespace)
9
9
  node ? node.text.gsub(/\.$/, '') : nil
10
10
  end
11
-
12
- def heading
13
- node = at_xpath('./a:heading', a: Slaw::NS)
14
- node ? node.text : nil
15
- end
16
-
17
- def id
18
- self['id']
19
- end
20
-
21
- def chapters
22
- xpath('./a:chapter', a: Slaw::NS)
23
- end
24
-
25
- def sections
26
- xpath('./a:section', a: Slaw::NS)
27
- end
28
-
29
- def parts
30
- xpath('./a:part', a: Slaw::NS)
31
- end
32
-
33
- # Get a nodeset of child elements of this node which should show
34
- # up in the table of contents
35
- def toc_children
36
- if in_schedules?
37
- # in schedules, we only care about chapters that have numbers in them, because we
38
- # can't link to them otherwise
39
- xpath('a:chapter[a:num]', a: Slaw::NS)
40
- else
41
- xpath('a:part | a:chapter | a:section', a: Slaw::NS)
42
- end
43
- end
44
-
45
- # Does this element hold children for the table of contents?
46
- def toc_container?
47
- !toc_children.empty?
48
- end
49
-
50
- # Title for this element in the table of contents
51
- def toc_title
52
- case name
53
- when "mainBody"
54
- "Schedules"
55
- when "chapter"
56
- title = in_schedules? ? "Schedule" : "Chapter"
57
- title << ' ' + num
58
- title << ' - ' + heading if heading
59
- title
60
- when "part"
61
- "Part #{num} - #{heading}"
62
- when "section"
63
- if not heading or heading.empty?
64
- "Section #{num}"
65
- elsif num
66
- "#{num}. #{heading}"
67
- else
68
- heading
69
- end
70
- end
71
- end
72
-
73
- # Is this element part of a schedule document?
74
- def in_schedules?
75
- not ancestors('doc[name="schedules"]').empty?
76
- end
77
11
  end
data/slaw.gemspec CHANGED
@@ -25,5 +25,4 @@ Gem::Specification.new do |spec|
25
25
  spec.add_runtime_dependency "treetop", "~> 1.5"
26
26
  spec.add_runtime_dependency "log4r", "~> 1.1"
27
27
  spec.add_runtime_dependency "thor", "~> 0.20"
28
- spec.add_runtime_dependency "mimemagic", "~> 0.2"
29
28
  end
@@ -0,0 +1,38 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'spec_helper'
4
+
5
+ require 'slaw'
6
+
7
+ describe Slaw::Grammars::Counters do
8
+ describe '#clean' do
9
+ it 'should remove leading and trailing punctuation' do
10
+ described_class.clean("").should == ""
11
+ described_class.clean(" ").should == ""
12
+ described_class.clean("( )").should == ""
13
+ described_class.clean("(123.4-5)").should == "123-4-5"
14
+ described_class.clean("(312.32.7)").should == "312-32-7"
15
+ described_class.clean("(312_32_7)").should == "312-32-7"
16
+ described_class.clean("(6)").should == "6"
17
+ described_class.clean("[16]").should == "16"
18
+ described_class.clean("(i)").should == "i"
19
+ described_class.clean("[i]").should == "i"
20
+ described_class.clean("(2bis)").should == "2bis"
21
+ described_class.clean('"1.2.').should == "1-2"
22
+ described_class.clean("1.2.").should == "1-2"
23
+ described_class.clean("“2.3").should == "2-3"
24
+ described_class.clean("2,3").should == "2-3"
25
+ described_class.clean("2,3, 4,").should == "2-3-4"
26
+ described_class.clean("3a bis").should == "3abis"
27
+ described_class.clean("3é").should == "3é"
28
+ described_class.clean(" -3a--4,9").should == "3a-4-9"
29
+ end
30
+
31
+ it 'should handle non-arabic numerals' do
32
+ # hebrew aleph
33
+ described_class.clean("(א)").should == "א"
34
+ # chinese 3
35
+ described_class.clean("(三)").should == "三"
36
+ end
37
+ end
38
+ end
@@ -1,26 +1,26 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <akomaNtoso xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.akomantoso.org/2.0" xsi:schemaLocation="http://www.akomantoso.org/2.0 akomantoso20.xsd">
2
+ <akomaNtoso xmlns="http://docs.oasis-open.org/legaldocml/ns/akn/3.0">
3
3
  <act contains="singleVersion">
4
4
  <meta>
5
5
  <identification source="#openbylaws">
6
6
  <FRBRWork>
7
- <FRBRthis value="/za/by-law/cape-town/2002/community-fire-safety/main"/>
8
- <FRBRuri value="/za/by-law/cape-town/2002/community-fire-safety"/>
7
+ <FRBRthis value="/akn/za/by-law/cape-town/2002/community-fire-safety/main"/>
8
+ <FRBRuri value="/akn/za/by-law/cape-town/2002/community-fire-safety"/>
9
9
  <FRBRalias value="Community Fire Safety By-law"/>
10
10
  <FRBRdate date="2002-02-28" name="Generation"/>
11
11
  <FRBRauthor href="#council" as="#author"/>
12
12
  <FRBRcountry value="za"/>
13
13
  </FRBRWork>
14
14
  <FRBRExpression>
15
- <FRBRthis value="/za/by-law/cape-town/2002/community-fire-safety/main/eng@"/>
16
- <FRBRuri value="/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
15
+ <FRBRthis value="/akn/za/by-law/cape-town/2002/community-fire-safety/main/eng@"/>
16
+ <FRBRuri value="/akn/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
17
17
  <FRBRdate date="2002-02-28" name="Generation"/>
18
18
  <FRBRauthor href="#council" as="#author"/>
19
19
  <FRBRlanguage language="eng"/>
20
20
  </FRBRExpression>
21
21
  <FRBRManifestation>
22
- <FRBRthis value="/za/by-law/cape-town/2002/community-fire-safety/main/eng@"/>
23
- <FRBRuri value="/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
22
+ <FRBRthis value="/akn/za/by-law/cape-town/2002/community-fire-safety/main/eng@"/>
23
+ <FRBRuri value="/akn/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
24
24
  <FRBRdate date="2014-01-14" name="Generation"/>
25
25
  <FRBRauthor href="#openbylaws" as="#author"/>
26
26
  </FRBRManifestation>
@@ -34,8 +34,8 @@
34
34
  <TLCOrganization id="openbylaws" href="http://openbylaws.org.za" showAs="openbylaws.org.za"/>
35
35
  <TLCOrganization id="council" href="/ontology/organization/za/council.cape-town" showAs="Cape Town City Council"/>
36
36
  <TLCRole id="author" href="/ontology/role/author" showAs="Author"/>
37
- <original id="original" href="/za/by-law/cape-town/2002/community-fire-safety" showAs="Original"/>
38
- <passiveRef id="amendment-1" href="/za/by-law/cape-town/2007/community-fire-safety-amendment" showAs="Community Fire Safety Amendment By-law"/>
37
+ <original id="original" href="/akn/za/by-law/cape-town/2002/community-fire-safety" showAs="Original"/>
38
+ <passiveRef id="amendment-1" href="/akn/za/by-law/cape-town/2007/community-fire-safety-amendment" showAs="Community Fire Safety Amendment By-law"/>
39
39
  <TLCTerm id="term-above_ground_storage_tank" href="/ontology/term/this.eng.above_ground_storage_tank" showAs="above ground storage tank"/>
40
40
  <TLCTerm id="term-automatic_releasing_hold-open_device" href="/ontology/term/this.eng.automatic_releasing_hold-open_device" showAs="automatic releasing hold-open device"/>
41
41
  <TLCTerm id="term-boundary" href="/ontology/term/this.eng.boundary" showAs="boundary"/>
@@ -2914,22 +2914,22 @@ Any person who:— </listIntroduction>
2914
2914
  <meta>
2915
2915
  <identification source="#openbylaws">
2916
2916
  <FRBRWork>
2917
- <FRBRthis value="/za/by-law/cape-town/2002/community-fire-safety/schedules"/>
2918
- <FRBRuri value="/za/by-law/cape-town/2002/community-fire-safety"/>
2917
+ <FRBRthis value="/akn/za/by-law/cape-town/2002/community-fire-safety/schedules"/>
2918
+ <FRBRuri value="/akn/za/by-law/cape-town/2002/community-fire-safety"/>
2919
2919
  <FRBRdate date="2002-02-28" name="Generation"/>
2920
2920
  <FRBRauthor href="#council" as="#author"/>
2921
2921
  <FRBRcountry value="za"/>
2922
2922
  </FRBRWork>
2923
2923
  <FRBRExpression>
2924
- <FRBRthis value="/za/by-law/cape-town/2002/community-fire-safety/schedules/eng@"/>
2925
- <FRBRuri value="/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
2924
+ <FRBRthis value="/akn/za/by-law/cape-town/2002/community-fire-safety/schedules/eng@"/>
2925
+ <FRBRuri value="/akn/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
2926
2926
  <FRBRdate date="2002-02-28" name="Generation"/>
2927
2927
  <FRBRauthor href="#council" as="#author"/>
2928
2928
  <FRBRlanguage language="eng"/>
2929
2929
  </FRBRExpression>
2930
2930
  <FRBRManifestation>
2931
- <FRBRthis value="/za/by-law/cape-town/2002/community-fire-safety/schedules/eng@"/>
2932
- <FRBRuri value="/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
2931
+ <FRBRthis value="/akn/za/by-law/cape-town/2002/community-fire-safety/schedules/eng@"/>
2932
+ <FRBRuri value="/akn/za/by-law/cape-town/2002/community-fire-safety/eng@"/>
2933
2933
  <FRBRdate date="2014-01-14" name="Generation"/>
2934
2934
  <FRBRauthor href="#openbylaws" as="#author"/>
2935
2935
  </FRBRManifestation>
@@ -207,7 +207,7 @@ Hello [there](/za/act/123) friend.
207
207
  it 'should replace eol with newlines in tables' do
208
208
  doc = xml2doc(section(<<XML
209
209
  <num>1.</num>
210
- <table id="section-21.paragraph-0.table1">
210
+ <table eId="sec__21_table_1">
211
211
  <tr>
212
212
  <td>
213
213
  <p>foo<eol/>bar<eol/>baz</p>
@@ -7,28 +7,28 @@ describe Slaw::Parse::Blocklists do
7
7
  describe '#adjust_blocklists' do
8
8
  it 'should nest simple blocks' do
9
9
  doc = xml2doc(subsection(<<XML
10
- <blockList id="section-10.1.lst0" renest="true">
11
- <item id="section-10.1.lst0.a">
10
+ <blockList eId="sec__10__subsec_1__list_1" renest="true">
11
+ <item eId="sec__10__subsec_1__list_1__item_a">
12
12
  <num>(a)</num>
13
13
  <p>foo</p>
14
14
  </item>
15
- <item id="section-10.1.lst0.i">
15
+ <item eId="sec__10__subsec_1__list_1__item_i">
16
16
  <num>(i)</num>
17
17
  <p>item-i</p>
18
18
  </item>
19
- <item id="section-10.1.lst0.ii">
19
+ <item eId="sec__10__subsec_1__list_1__item_ii">
20
20
  <num>(ii)</num>
21
21
  <p>item-ii</p>
22
22
  </item>
23
- <item id="section-10.1.lst0.iii">
23
+ <item eId="sec__10__subsec_1__list_1__item_iii">
24
24
  <num>(iii)</num>
25
25
  <p>item-iii</p>
26
26
  </item>
27
- <item id="section-10.1.lst0.aa">
27
+ <item eId="sec__10__subsec_1__list_1__item_aa">
28
28
  <num>(aa)</num>
29
29
  <p>item-aa</p>
30
30
  </item>
31
- <item id="section-10.1.lst0.bb">
31
+ <item eId="sec__10__subsec_1__list_1__item_bb">
32
32
  <num>(bb)</num>
33
33
  <p>item-bb</p>
34
34
  </item>
@@ -38,28 +38,28 @@ XML
38
38
 
39
39
  subject.adjust_blocklists(doc)
40
40
  doc.to_s.should == subsection(<<XML
41
- <blockList id="section-10.1.lst0">
42
- <item id="section-10.1.lst0.a">
41
+ <blockList eId="sec__10__subsec_1__list_1">
42
+ <item eId="sec__10__subsec_1__list_1__item_a">
43
43
  <num>(a)</num>
44
- <blockList id="section-10.1.lst0.a.list0">
44
+ <blockList eId="sec__10__subsec_1__list_1__item_a__list_1">
45
45
  <listIntroduction>foo</listIntroduction>
46
- <item id="section-10.1.lst0.a.list0.i">
46
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_i">
47
47
  <num>(i)</num>
48
48
  <p>item-i</p>
49
49
  </item>
50
- <item id="section-10.1.lst0.a.list0.ii">
50
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_ii">
51
51
  <num>(ii)</num>
52
52
  <p>item-ii</p>
53
53
  </item>
54
- <item id="section-10.1.lst0.a.list0.iii">
54
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_iii">
55
55
  <num>(iii)</num>
56
- <blockList id="section-10.1.lst0.a.list0.iii.list0">
56
+ <blockList eId="sec__10__subsec_1__list_1__item_a__list_1__item_iii__list_1">
57
57
  <listIntroduction>item-iii</listIntroduction>
58
- <item id="section-10.1.lst0.a.list0.iii.list0.aa">
58
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_iii__list_1__item_aa">
59
59
  <num>(aa)</num>
60
60
  <p>item-aa</p>
61
61
  </item>
62
- <item id="section-10.1.lst0.a.list0.iii.list0.bb">
62
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_iii__list_1__item_bb">
63
63
  <num>(bb)</num>
64
64
  <p>item-bb</p>
65
65
  </item>
@@ -76,20 +76,20 @@ XML
76
76
 
77
77
  it 'should jump back up a level' do
78
78
  doc = xml2doc(subsection(<<XML
79
- <blockList id="section-10.1.lst0" renest="true">
80
- <item id="section-10.1.lst0.a">
79
+ <blockList eId="sec__10__subsec_1__list_1" renest="true">
80
+ <item eId="sec__10__subsec_1__list_1__item_a">
81
81
  <num>(a)</num>
82
82
  <p>foo</p>
83
83
  </item>
84
- <item id="section-10.1.lst0.i">
84
+ <item eId="sec__10__subsec_1__list_1__item_i">
85
85
  <num>(i)</num>
86
86
  <p>item-i</p>
87
87
  </item>
88
- <item id="section-10.1.lst0.ii">
88
+ <item eId="sec__10__subsec_1__list_1__item_ii">
89
89
  <num>(ii)</num>
90
90
  <p>item-ii</p>
91
91
  </item>
92
- <item id="section-10.1.lst0.c">
92
+ <item eId="sec__10__subsec_1__list_1__item_c">
93
93
  <num>(c)</num>
94
94
  <p>item-c</p>
95
95
  </item>
@@ -99,22 +99,22 @@ XML
99
99
 
100
100
  subject.adjust_blocklists(doc)
101
101
  doc.to_s.should == subsection(<<XML
102
- <blockList id="section-10.1.lst0">
103
- <item id="section-10.1.lst0.a">
102
+ <blockList eId="sec__10__subsec_1__list_1">
103
+ <item eId="sec__10__subsec_1__list_1__item_a">
104
104
  <num>(a)</num>
105
- <blockList id="section-10.1.lst0.a.list0">
105
+ <blockList eId="sec__10__subsec_1__list_1__item_a__list_1">
106
106
  <listIntroduction>foo</listIntroduction>
107
- <item id="section-10.1.lst0.a.list0.i">
107
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_i">
108
108
  <num>(i)</num>
109
109
  <p>item-i</p>
110
110
  </item>
111
- <item id="section-10.1.lst0.a.list0.ii">
111
+ <item eId="sec__10__subsec_1__list_1__item_a__list_1__item_ii">
112
112
  <num>(ii)</num>
113
113
  <p>item-ii</p>
114
114
  </item>
115
115
  </blockList>
116
116
  </item>
117
- <item id="section-10.1.lst0.c">
117
+ <item eId="sec__10__subsec_1__list_1__item_c">
118
118
  <num>(c)</num>
119
119
  <p>item-c</p>
120
120
  </item>
@@ -127,16 +127,16 @@ XML
127
127
 
128
128
  it 'should handle (i) correctly' do
129
129
  doc = xml2doc(subsection(<<XML
130
- <blockList id="section-10.1.lst0" renest="true">
131
- <item id="section-10.1.lst0.h">
130
+ <blockList eId="sec__10__subsec_1__list_1" renest="true">
131
+ <item eId="sec__10__subsec_1__list_1__item_h">
132
132
  <num>(h)</num>
133
133
  <p>foo</p>
134
134
  </item>
135
- <item id="section-10.1.lst0.i">
135
+ <item eId="sec__10__subsec_1__list_1__item_i">
136
136
  <num>(i)</num>
137
137
  <p>item-i</p>
138
138
  </item>
139
- <item id="section-10.1.lst0.j">
139
+ <item eId="sec__10__subsec_1__list_1__item_j">
140
140
  <num>(j)</num>
141
141
  <p>item-ii</p>
142
142
  </item>
@@ -146,16 +146,16 @@ XML
146
146
 
147
147
  subject.adjust_blocklists(doc)
148
148
  doc.to_s.should == subsection(<<XML
149
- <blockList id="section-10.1.lst0">
150
- <item id="section-10.1.lst0.h">
149
+ <blockList eId="sec__10__subsec_1__list_1">
150
+ <item eId="sec__10__subsec_1__list_1__item_h">
151
151
  <num>(h)</num>
152
152
  <p>foo</p>
153
153
  </item>
154
- <item id="section-10.1.lst0.i">
154
+ <item eId="sec__10__subsec_1__list_1__item_i">
155
155
  <num>(i)</num>
156
156
  <p>item-i</p>
157
157
  </item>
158
- <item id="section-10.1.lst0.j">
158
+ <item eId="sec__10__subsec_1__list_1__item_j">
159
159
  <num>(j)</num>
160
160
  <p>item-ii</p>
161
161
  </item>
@@ -168,24 +168,24 @@ XML
168
168
 
169
169
  it 'should handle (u) (v) and (x) correctly' do
170
170
  doc = xml2doc(subsection(<<XML
171
- <blockList id="section-10.1.lst0" renest="true">
172
- <item id="section-10.1.lst0.t">
171
+ <blockList eId="sec__10__subsec_1__list_1" renest="true">
172
+ <item eId="sec__10__subsec_1__list_1__item_t">
173
173
  <num>(t)</num>
174
174
  <p>foo</p>
175
175
  </item>
176
- <item id="section-10.1.lst0.u">
176
+ <item eId="sec__10__subsec_1__list_1__item_u">
177
177
  <num>(u)</num>
178
178
  <p>item-i</p>
179
179
  </item>
180
- <item id="section-10.1.lst0.v">
180
+ <item eId="sec__10__subsec_1__list_1__item_v">
181
181
  <num>(v)</num>
182
182
  <p>item-ii</p>
183
183
  </item>
184
- <item id="section-10.1.lst0.w">
184
+ <item eId="sec__10__subsec_1__list_1__item_w">
185
185
  <num>(w)</num>
186
186
  <p>item-ii</p>
187
187
  </item>
188
- <item id="section-10.1.lst0.x">
188
+ <item eId="sec__10__subsec_1__list_1__item_x">
189
189
  <num>(x)</num>
190
190
  <p>item-ii</p>
191
191
  </item>
@@ -195,24 +195,24 @@ XML
195
195
 
196
196
  subject.adjust_blocklists(doc)
197
197
  doc.to_s.should == subsection(<<XML
198
- <blockList id="section-10.1.lst0">
199
- <item id="section-10.1.lst0.t">
198
+ <blockList eId="sec__10__subsec_1__list_1">
199
+ <item eId="sec__10__subsec_1__list_1__item_t">
200
200
  <num>(t)</num>
201
201
  <p>foo</p>
202
202
  </item>
203
- <item id="section-10.1.lst0.u">
203
+ <item eId="sec__10__subsec_1__list_1__item_u">
204
204
  <num>(u)</num>
205
205
  <p>item-i</p>
206
206
  </item>
207
- <item id="section-10.1.lst0.v">
207
+ <item eId="sec__10__subsec_1__list_1__item_v">
208
208
  <num>(v)</num>
209
209
  <p>item-ii</p>
210
210
  </item>
211
- <item id="section-10.1.lst0.w">
211
+ <item eId="sec__10__subsec_1__list_1__item_w">
212
212
  <num>(w)</num>
213
213
  <p>item-ii</p>
214
214
  </item>
215
- <item id="section-10.1.lst0.x">
215
+ <item eId="sec__10__subsec_1__list_1__item_x">
216
216
  <num>(x)</num>
217
217
  <p>item-ii</p>
218
218
  </item>
@@ -226,34 +226,34 @@ XML
226
226
 
227
227
  it 'should handle (j) correctly' do
228
228
  doc = xml2doc(subsection(<<XML
229
- <blockList id="section-28.3.list2" renest="true">
230
- <item id="section-28.3.list2.g">
229
+ <blockList eId="sec__28__subsec_3__item_list2" renest="true">
230
+ <item eId="sec__28__subsec_3__item_list2.g">
231
231
  <num>(g)</num>
232
- <p>all <term refersTo="#term-memorial_work" id="trm381">memorial work</term> up to 150 mm in thickness must be securely attached to the base;</p>
232
+ <p>all <term refersTo="#term-memorial_work" eId="trm381">memorial work</term> up to 150 mm in thickness must be securely attached to the base;</p>
233
233
  </item>
234
- <item id="section-28.3.list2.h">
234
+ <item eId="sec__28__subsec_3__item_list2.h">
235
235
  <num>(h)</num>
236
- <p>all the components of <term refersTo="#term-memorial_work" id="trm382">memorial work</term> must be completed before being brought into a <term refersTo="#term-cemetery" id="trm383">cemetery</term>;</p>
236
+ <p>all the components of <term refersTo="#term-memorial_work" eId="trm382">memorial work</term> must be completed before being brought into a <term refersTo="#term-cemetery" eId="trm383">cemetery</term>;</p>
237
237
  </item>
238
- <item id="section-28.3.list2.i">
238
+ <item eId="sec__28__subsec_3__item_list2.i">
239
239
  <num>(i)</num>
240
240
  <p>footstones must consist of one solid piece;</p>
241
241
  </item>
242
- <item id="section-28.3.list2.j">
242
+ <item eId="sec__28__subsec_3__item_list2.j">
243
243
  <num>(j)</num>
244
- <p>in all cases where <term refersTo="#term-memorial_work" id="trm384">memorial work</term> rests on a base -</p>
244
+ <p>in all cases where <term refersTo="#term-memorial_work" eId="trm384">memorial work</term> rests on a base -</p>
245
245
  </item>
246
- <item id="section-28.3.list2.i">
246
+ <item eId="sec__28__subsec_3__item_list2.i">
247
247
  <num>(i)</num>
248
- <p>such <term refersTo="#term-memorial_work" id="trm385">memorial work</term> must have a foundation;</p>
248
+ <p>such <term refersTo="#term-memorial_work" eId="trm385">memorial work</term> must have a foundation;</p>
249
249
  </item>
250
- <item id="section-28.3.list2.ii">
250
+ <item eId="sec__28__subsec_3__item_list2.ii">
251
251
  <num>(ii)</num>
252
- <p>such <term refersTo="#term-memorial_work" id="trm386">memorial work</term> must be set with cement mortar;</p>
252
+ <p>such <term refersTo="#term-memorial_work" eId="trm386">memorial work</term> must be set with cement mortar;</p>
253
253
  </item>
254
- <item id="section-28.3.list2.iii">
254
+ <item eId="sec__28__subsec_3__item_list2.iii">
255
255
  <num>(iii)</num>
256
- <p>the bottom base of a single <term refersTo="#term-memorial_work" id="trm387">memorial work</term> must not be less than 900mm long 220 mm wide x 250 mm thick and that of a double <term refersTo="#term-memorial_work" id="trm388">memorial work</term> not less than 2 286 mm long x 200 mm wide x 250 mm thick; and</p>
256
+ <p>the bottom base of a single <term refersTo="#term-memorial_work" eId="trm387">memorial work</term> must not be less than 900mm long 220 mm wide x 250 mm thick and that of a double <term refersTo="#term-memorial_work" eId="trm388">memorial work</term> not less than 2 286 mm long x 200 mm wide x 250 mm thick; and</p>
257
257
  </item>
258
258
  </blockList>
259
259
  XML
@@ -261,34 +261,34 @@ XML
261
261
 
262
262
  subject.adjust_blocklists(doc)
263
263
  doc.to_s.should == subsection(<<XML
264
- <blockList id="section-28.3.list2">
265
- <item id="section-28.3.list2.g">
264
+ <blockList eId="sec__28__subsec_3__item_list2">
265
+ <item eId="sec__28__subsec_3__item_list2.g">
266
266
  <num>(g)</num>
267
- <p>all <term refersTo="#term-memorial_work" id="trm381">memorial work</term> up to 150 mm in thickness must be securely attached to the base;</p>
267
+ <p>all <term refersTo="#term-memorial_work" eId="trm381">memorial work</term> up to 150 mm in thickness must be securely attached to the base;</p>
268
268
  </item>
269
- <item id="section-28.3.list2.h">
269
+ <item eId="sec__28__subsec_3__item_list2.h">
270
270
  <num>(h)</num>
271
- <p>all the components of <term refersTo="#term-memorial_work" id="trm382">memorial work</term> must be completed before being brought into a <term refersTo="#term-cemetery" id="trm383">cemetery</term>;</p>
271
+ <p>all the components of <term refersTo="#term-memorial_work" eId="trm382">memorial work</term> must be completed before being brought into a <term refersTo="#term-cemetery" eId="trm383">cemetery</term>;</p>
272
272
  </item>
273
- <item id="section-28.3.list2.i">
273
+ <item eId="sec__28__subsec_3__item_list2.i">
274
274
  <num>(i)</num>
275
275
  <p>footstones must consist of one solid piece;</p>
276
276
  </item>
277
- <item id="section-28.3.list2.j">
277
+ <item eId="sec__28__subsec_3__item_list2.j">
278
278
  <num>(j)</num>
279
- <blockList id="section-28.3.list2.j.list0">
280
- <listIntroduction>in all cases where <term refersTo="#term-memorial_work" id="trm384">memorial work</term> rests on a base -</listIntroduction>
281
- <item id="section-28.3.list2.j.list0.i">
279
+ <blockList eId="sec__28__subsec_3__item_list2.j__list_1">
280
+ <listIntroduction>in all cases where <term refersTo="#term-memorial_work" eId="trm384">memorial work</term> rests on a base -</listIntroduction>
281
+ <item eId="sec__28__subsec_3__item_list2.j__list_1__item_i">
282
282
  <num>(i)</num>
283
- <p>such <term refersTo="#term-memorial_work" id="trm385">memorial work</term> must have a foundation;</p>
283
+ <p>such <term refersTo="#term-memorial_work" eId="trm385">memorial work</term> must have a foundation;</p>
284
284
  </item>
285
- <item id="section-28.3.list2.j.list0.ii">
285
+ <item eId="sec__28__subsec_3__item_list2.j__list_1__item_ii">
286
286
  <num>(ii)</num>
287
- <p>such <term refersTo="#term-memorial_work" id="trm386">memorial work</term> must be set with cement mortar;</p>
287
+ <p>such <term refersTo="#term-memorial_work" eId="trm386">memorial work</term> must be set with cement mortar;</p>
288
288
  </item>
289
- <item id="section-28.3.list2.j.list0.iii">
289
+ <item eId="sec__28__subsec_3__item_list2.j__list_1__item_iii">
290
290
  <num>(iii)</num>
291
- <p>the bottom base of a single <term refersTo="#term-memorial_work" id="trm387">memorial work</term> must not be less than 900mm long 220 mm wide x 250 mm thick and that of a double <term refersTo="#term-memorial_work" id="trm388">memorial work</term> not less than 2 286 mm long x 200 mm wide x 250 mm thick; and</p>
291
+ <p>the bottom base of a single <term refersTo="#term-memorial_work" eId="trm387">memorial work</term> must not be less than 900mm long 220 mm wide x 250 mm thick and that of a double <term refersTo="#term-memorial_work" eId="trm388">memorial work</term> not less than 2 286 mm long x 200 mm wide x 250 mm thick; and</p>
292
292
  </item>
293
293
  </blockList>
294
294
  </item>
@@ -300,40 +300,40 @@ XML
300
300
  # -------------------------------------------------------------------------
301
301
  it 'should handle (I) correctly' do
302
302
  doc = xml2doc(subsection(<<XML
303
- <blockList id="section-28.3.list2" renest="true">
304
- <item id="section-28.3.list2.g">
303
+ <blockList eId="sec__28__subsec_3__item_list2" renest="true">
304
+ <item eId="sec__28__subsec_3__item_list2.g">
305
305
  <num>(g)</num>
306
306
  <p>all memorial work up to 150 mm in thickness must be securely attached to the base;</p>
307
307
  </item>
308
- <item id="section-28.3.list2.h">
308
+ <item eId="sec__28__subsec_3__item_list2.h">
309
309
  <num>(h)</num>
310
310
  <p>all the components of memorial work must be completed before being brought into a cemetery;</p>
311
311
  </item>
312
- <item id="section-28.3.list2.i">
312
+ <item eId="sec__28__subsec_3__item_list2.i">
313
313
  <num>(i)</num>
314
314
  <p>item i</p>
315
315
  </item>
316
- <item id="section-28.3.list2.I">
316
+ <item eId="sec__28__subsec_3__item_list2.I">
317
317
  <num>(I)</num>
318
318
  <p>a subitem</p>
319
319
  </item>
320
- <item id="section-28.3.list2.II">
320
+ <item eId="sec__28__subsec_3__item_list2.II">
321
321
  <num>(II)</num>
322
322
  <p>another subitem</p>
323
323
  </item>
324
- <item id="section-28.3.list2.j">
324
+ <item eId="sec__28__subsec_3__item_list2.j">
325
325
  <num>(j)</num>
326
326
  <p>in all cases where memorial work rests on a base -</p>
327
327
  </item>
328
- <item id="section-28.3.list2.i">
328
+ <item eId="sec__28__subsec_3__item_list2.i">
329
329
  <num>(i)</num>
330
330
  <p>such memorial work must have a foundation;</p>
331
331
  </item>
332
- <item id="section-28.3.list2.ii">
332
+ <item eId="sec__28__subsec_3__item_list2.ii">
333
333
  <num>(ii)</num>
334
334
  <p>such memorial work must be set with cement mortar;</p>
335
335
  </item>
336
- <item id="section-28.3.list2.iii">
336
+ <item eId="sec__28__subsec_3__item_list2.iii">
337
337
  <num>(iii)</num>
338
338
  <p>the bottom base of a single memorial work must not be less than 900mm long 220 mm wide x 250 mm thick and that of a double memorial work not less than 2 286 mm long x 200 mm wide x 250 mm thick; and</p>
339
339
  </item>
@@ -343,42 +343,42 @@ XML
343
343
 
344
344
  subject.adjust_blocklists(doc)
345
345
  doc.to_s.should == subsection(<<XML
346
- <blockList id="section-28.3.list2">
347
- <item id="section-28.3.list2.g">
346
+ <blockList eId="sec__28__subsec_3__item_list2">
347
+ <item eId="sec__28__subsec_3__item_list2.g">
348
348
  <num>(g)</num>
349
349
  <p>all memorial work up to 150 mm in thickness must be securely attached to the base;</p>
350
350
  </item>
351
- <item id="section-28.3.list2.h">
351
+ <item eId="sec__28__subsec_3__item_list2.h">
352
352
  <num>(h)</num>
353
353
  <p>all the components of memorial work must be completed before being brought into a cemetery;</p>
354
354
  </item>
355
- <item id="section-28.3.list2.i">
355
+ <item eId="sec__28__subsec_3__item_list2.i">
356
356
  <num>(i)</num>
357
- <blockList id="section-28.3.list2.i.list0">
357
+ <blockList eId="sec__28__subsec_3__item_list2.i__list_1">
358
358
  <listIntroduction>item i</listIntroduction>
359
- <item id="section-28.3.list2.i.list0.I">
359
+ <item eId="sec__28__subsec_3__item_list2.i__list_1__item_I">
360
360
  <num>(I)</num>
361
361
  <p>a subitem</p>
362
362
  </item>
363
- <item id="section-28.3.list2.i.list0.II">
363
+ <item eId="sec__28__subsec_3__item_list2.i__list_1__item_II">
364
364
  <num>(II)</num>
365
365
  <p>another subitem</p>
366
366
  </item>
367
367
  </blockList>
368
368
  </item>
369
- <item id="section-28.3.list2.j">
369
+ <item eId="sec__28__subsec_3__item_list2.j">
370
370
  <num>(j)</num>
371
- <blockList id="section-28.3.list2.j.list1">
371
+ <blockList eId="sec__28__subsec_3__item_list2.j__list_2">
372
372
  <listIntroduction>in all cases where memorial work rests on a base -</listIntroduction>
373
- <item id="section-28.3.list2.j.list1.i">
373
+ <item eId="sec__28__subsec_3__item_list2.j__list_2__item_i">
374
374
  <num>(i)</num>
375
375
  <p>such memorial work must have a foundation;</p>
376
376
  </item>
377
- <item id="section-28.3.list2.j.list1.ii">
377
+ <item eId="sec__28__subsec_3__item_list2.j__list_2__item_ii">
378
378
  <num>(ii)</num>
379
379
  <p>such memorial work must be set with cement mortar;</p>
380
380
  </item>
381
- <item id="section-28.3.list2.j.list1.iii">
381
+ <item eId="sec__28__subsec_3__item_list2.j__list_2__item_iii">
382
382
  <num>(iii)</num>
383
383
  <p>the bottom base of a single memorial work must not be less than 900mm long 220 mm wide x 250 mm thick and that of a double memorial work not less than 2 286 mm long x 200 mm wide x 250 mm thick; and</p>
384
384
  </item>
@@ -393,20 +393,20 @@ XML
393
393
 
394
394
  it 'should treat (aa) after (z) as siblings' do
395
395
  doc = xml2doc(subsection(<<XML
396
- <blockList id="list0">
397
- <item id="list0.y">
396
+ <blockList eId="list0">
397
+ <item eId="list0.y">
398
398
  <num>(y)</num>
399
399
  <p>foo</p>
400
400
  </item>
401
- <item id="list0.z">
401
+ <item eId="list0.z">
402
402
  <num>(z)</num>
403
403
  <p>item-z</p>
404
404
  </item>
405
- <item id="list0.aa">
405
+ <item eId="list0.aa">
406
406
  <num>(aa)</num>
407
407
  <p>item-aa</p>
408
408
  </item>
409
- <item id="list0.bb">
409
+ <item eId="list0.bb">
410
410
  <num>(bb)</num>
411
411
  <p>item-bb</p>
412
412
  </item>
@@ -416,20 +416,20 @@ XML
416
416
 
417
417
  subject.adjust_blocklists(doc)
418
418
  doc.to_s.should == subsection(<<XML
419
- <blockList id="list0">
420
- <item id="list0.y">
419
+ <blockList eId="list0">
420
+ <item eId="list0.y">
421
421
  <num>(y)</num>
422
422
  <p>foo</p>
423
423
  </item>
424
- <item id="list0.z">
424
+ <item eId="list0.z">
425
425
  <num>(z)</num>
426
426
  <p>item-z</p>
427
427
  </item>
428
- <item id="list0.aa">
428
+ <item eId="list0.aa">
429
429
  <num>(aa)</num>
430
430
  <p>item-aa</p>
431
431
  </item>
432
- <item id="list0.bb">
432
+ <item eId="list0.bb">
433
433
  <num>(bb)</num>
434
434
  <p>item-bb</p>
435
435
  </item>
@@ -442,20 +442,20 @@ XML
442
442
 
443
443
  it 'should treat (AA) after (z) a sublist' do
444
444
  doc = xml2doc(subsection(<<XML
445
- <blockList id="list0" renest="true">
446
- <item id="list0.y">
445
+ <blockList eId="list0" renest="true">
446
+ <item eId="list0.y">
447
447
  <num>(y)</num>
448
448
  <p>foo</p>
449
449
  </item>
450
- <item id="list0.z">
450
+ <item eId="list0.z">
451
451
  <num>(z)</num>
452
452
  <p>item-z</p>
453
453
  </item>
454
- <item id="list0.AA">
454
+ <item eId="list0.AA">
455
455
  <num>(AA)</num>
456
456
  <p>item-AA</p>
457
457
  </item>
458
- <item id="list0.BB">
458
+ <item eId="list0.BB">
459
459
  <num>(BB)</num>
460
460
  <p>item-BB</p>
461
461
  </item>
@@ -465,20 +465,20 @@ XML
465
465
 
466
466
  subject.adjust_blocklists(doc)
467
467
  doc.to_s.should == subsection(<<XML
468
- <blockList id="list0">
469
- <item id="list0.y">
468
+ <blockList eId="list0">
469
+ <item eId="list0.y">
470
470
  <num>(y)</num>
471
471
  <p>foo</p>
472
472
  </item>
473
- <item id="list0.z">
473
+ <item eId="list0.z">
474
474
  <num>(z)</num>
475
- <blockList id="list0.z.list0">
475
+ <blockList eId="list0.z__list_1">
476
476
  <listIntroduction>item-z</listIntroduction>
477
- <item id="list0.z.list0.AA">
477
+ <item eId="list0.z__list_1__item_AA">
478
478
  <num>(AA)</num>
479
479
  <p>item-AA</p>
480
480
  </item>
481
- <item id="list0.z.list0.BB">
481
+ <item eId="list0.z__list_1__item_BB">
482
482
  <num>(BB)</num>
483
483
  <p>item-BB</p>
484
484
  </item>
@@ -493,44 +493,44 @@ XML
493
493
 
494
494
  it 'should handle deeply nested lists' do
495
495
  doc = xml2doc(subsection(<<XML
496
- <blockList id="list0" renest="true">
497
- <item id="list0.a">
496
+ <blockList eId="list0" renest="true">
497
+ <item eId="list0.a">
498
498
  <num>(a)</num>
499
499
  <p>foo</p>
500
500
  </item>
501
- <item id="list0.b">
501
+ <item eId="list0.b">
502
502
  <num>(b)</num>
503
503
  <p>item-b</p>
504
504
  </item>
505
- <item id="list0.i">
505
+ <item eId="list0.i">
506
506
  <num>(i)</num>
507
507
  <p>item-b-i</p>
508
508
  </item>
509
- <item id="list0.aa">
509
+ <item eId="list0.aa">
510
510
  <num>(aa)</num>
511
511
  <p>item-i-aa</p>
512
512
  </item>
513
- <item id="list0.bb">
513
+ <item eId="list0.bb">
514
514
  <num>(bb)</num>
515
515
  <p>item-i-bb</p>
516
516
  </item>
517
- <item id="list0.ii">
517
+ <item eId="list0.ii">
518
518
  <num>(ii)</num>
519
519
  <p>item-b-ii</p>
520
520
  </item>
521
- <item id="list0.c">
521
+ <item eId="list0.c">
522
522
  <num>(c)</num>
523
523
  <p>item-c</p>
524
524
  </item>
525
- <item id="list0.i">
525
+ <item eId="list0.i">
526
526
  <num>(i)</num>
527
527
  <p>item-c-i</p>
528
528
  </item>
529
- <item id="list0.ii">
529
+ <item eId="list0.ii">
530
530
  <num>(ii)</num>
531
531
  <p>item-c-ii</p>
532
532
  </item>
533
- <item id="list0.iii">
533
+ <item eId="list0.iii">
534
534
  <num>(iii)</num>
535
535
  <p>item-c-iii</p>
536
536
  </item>
@@ -540,48 +540,48 @@ XML
540
540
 
541
541
  subject.adjust_blocklists(doc)
542
542
  doc.to_s.should == subsection(<<XML
543
- <blockList id="list0">
544
- <item id="list0.a">
543
+ <blockList eId="list0">
544
+ <item eId="list0.a">
545
545
  <num>(a)</num>
546
546
  <p>foo</p>
547
547
  </item>
548
- <item id="list0.b">
548
+ <item eId="list0.b">
549
549
  <num>(b)</num>
550
- <blockList id="list0.b.list0">
550
+ <blockList eId="list0.b__list_1">
551
551
  <listIntroduction>item-b</listIntroduction>
552
- <item id="list0.b.list0.i">
552
+ <item eId="list0.b__list_1__item_i">
553
553
  <num>(i)</num>
554
- <blockList id="list0.b.list0.i.list0">
554
+ <blockList eId="list0.b__list_1__item_i__list_1">
555
555
  <listIntroduction>item-b-i</listIntroduction>
556
- <item id="list0.b.list0.i.list0.aa">
556
+ <item eId="list0.b__list_1__item_i__list_1__item_aa">
557
557
  <num>(aa)</num>
558
558
  <p>item-i-aa</p>
559
559
  </item>
560
- <item id="list0.b.list0.i.list0.bb">
560
+ <item eId="list0.b__list_1__item_i__list_1__item_bb">
561
561
  <num>(bb)</num>
562
562
  <p>item-i-bb</p>
563
563
  </item>
564
564
  </blockList>
565
565
  </item>
566
- <item id="list0.b.list0.ii">
566
+ <item eId="list0.b__list_1__item_ii">
567
567
  <num>(ii)</num>
568
568
  <p>item-b-ii</p>
569
569
  </item>
570
570
  </blockList>
571
571
  </item>
572
- <item id="list0.c">
572
+ <item eId="list0.c">
573
573
  <num>(c)</num>
574
- <blockList id="list0.c.list1">
574
+ <blockList eId="list0.c__list_2">
575
575
  <listIntroduction>item-c</listIntroduction>
576
- <item id="list0.c.list1.i">
576
+ <item eId="list0.c__list_2__item_i">
577
577
  <num>(i)</num>
578
578
  <p>item-c-i</p>
579
579
  </item>
580
- <item id="list0.c.list1.ii">
580
+ <item eId="list0.c__list_2__item_ii">
581
581
  <num>(ii)</num>
582
582
  <p>item-c-ii</p>
583
583
  </item>
584
- <item id="list0.c.list1.iii">
584
+ <item eId="list0.c__list_2__item_iii">
585
585
  <num>(iii)</num>
586
586
  <p>item-c-iii</p>
587
587
  </item>
@@ -596,20 +596,20 @@ XML
596
596
 
597
597
  it 'should jump back up a level when finding (i) near (h)' do
598
598
  doc = xml2doc(subsection(<<XML
599
- <blockList id="section-10.1.lst0" renest="true">
600
- <item id="section-10.1.lst0.h">
599
+ <blockList eId="sec__10__subsec_1__list_1" renest="true">
600
+ <item eId="sec__10__subsec_1__list_1__item_h">
601
601
  <num>(h)</num>
602
602
  <p>foo</p>
603
603
  </item>
604
- <item id="section-10.1.lst0.i">
604
+ <item eId="sec__10__subsec_1__list_1__item_i">
605
605
  <num>(i)</num>
606
606
  <p>item-i</p>
607
607
  </item>
608
- <item id="section-10.1.lst0.ii">
608
+ <item eId="sec__10__subsec_1__list_1__item_ii">
609
609
  <num>(ii)</num>
610
610
  <p>item-ii</p>
611
611
  </item>
612
- <item id="section-10.1.lst0.i">
612
+ <item eId="sec__10__subsec_1__list_1__item_i">
613
613
  <num>(i)</num>
614
614
  <p>item-i</p>
615
615
  </item>
@@ -619,22 +619,22 @@ XML
619
619
 
620
620
  subject.adjust_blocklists(doc)
621
621
  doc.to_s.should == subsection(<<XML
622
- <blockList id="section-10.1.lst0">
623
- <item id="section-10.1.lst0.h">
622
+ <blockList eId="sec__10__subsec_1__list_1">
623
+ <item eId="sec__10__subsec_1__list_1__item_h">
624
624
  <num>(h)</num>
625
- <blockList id="section-10.1.lst0.h.list0">
625
+ <blockList eId="sec__10__subsec_1__list_1__item_h__list_1">
626
626
  <listIntroduction>foo</listIntroduction>
627
- <item id="section-10.1.lst0.h.list0.i">
627
+ <item eId="sec__10__subsec_1__list_1__item_h__list_1__item_i">
628
628
  <num>(i)</num>
629
629
  <p>item-i</p>
630
630
  </item>
631
- <item id="section-10.1.lst0.h.list0.ii">
631
+ <item eId="sec__10__subsec_1__list_1__item_h__list_1__item_ii">
632
632
  <num>(ii)</num>
633
633
  <p>item-ii</p>
634
634
  </item>
635
635
  </blockList>
636
636
  </item>
637
- <item id="section-10.1.lst0.i">
637
+ <item eId="sec__10__subsec_1__list_1__item_i">
638
638
  <num>(i)</num>
639
639
  <p>item-i</p>
640
640
  </item>
@@ -647,16 +647,16 @@ XML
647
647
 
648
648
  it 'should handle dotted numbers correctly' do
649
649
  doc = xml2doc(subsection(<<XML
650
- <blockList id="section-9.subsection-2.list2" renest="true">
651
- <item id="section-9.subsection-2.list2.9.2.1">
650
+ <blockList eId="sec__9__item_subsection-2__list_3" renest="true">
651
+ <item eId="sec__9__item_subsection-2__list_3__item_9-2-1">
652
652
  <num>9.2.1</num>
653
653
  <p>is incapable of trading because of an illness, provided that:</p>
654
654
  </item>
655
- <item id="section-9.subsection-2.list2.9.2.1.1">
655
+ <item eId="sec__9__item_subsection-2__list_3__item_9-2-1-1">
656
656
  <num>9.2.1.1</num>
657
657
  <p>proof from a medical practitioner is provided to the City which certifies that the permit-holder is unable to trade; and</p>
658
658
  </item>
659
- <item id="section-9.subsection-2.list2.9.2.1.2">
659
+ <item eId="sec__9__item_subsection-2__list_3__item_9-2-1-2">
660
660
  <num>9.2.1.2</num>
661
661
  <p>the dependent or assistant is only permitted to replace the permit-</p>
662
662
  </item>
@@ -666,16 +666,16 @@ XML
666
666
 
667
667
  subject.adjust_blocklists(doc)
668
668
  doc.to_s.should == subsection(<<XML
669
- <blockList id="section-9.subsection-2.list2">
670
- <item id="section-9.subsection-2.list2.9.2.1">
669
+ <blockList eId="sec__9__item_subsection-2__list_3">
670
+ <item eId="sec__9__item_subsection-2__list_3__item_9-2-1">
671
671
  <num>9.2.1</num>
672
- <blockList id="section-9.subsection-2.list2.9.2.1.list0">
672
+ <blockList eId="sec__9__item_subsection-2__list_3__item_9-2-1__list_1">
673
673
  <listIntroduction>is incapable of trading because of an illness, provided that:</listIntroduction>
674
- <item id="section-9.subsection-2.list2.9.2.1.list0.9.2.1.1">
674
+ <item eId="sec__9__item_subsection-2__list_3__item_9-2-1__list_1__item_9-2-1-1">
675
675
  <num>9.2.1.1</num>
676
676
  <p>proof from a medical practitioner is provided to the City which certifies that the permit-holder is unable to trade; and</p>
677
677
  </item>
678
- <item id="section-9.subsection-2.list2.9.2.1.list0.9.2.1.2">
678
+ <item eId="sec__9__item_subsection-2__list_3__item_9-2-1__list_1__item_9-2-1-2">
679
679
  <num>9.2.1.2</num>
680
680
  <p>the dependent or assistant is only permitted to replace the permit-</p>
681
681
  </item>
@@ -689,8 +689,8 @@ XML
689
689
  it 'should handle p tags just before' do
690
690
  doc = xml2doc(subsection(<<XML
691
691
  <p>intro</p>
692
- <blockList id="section-10.1.lst0">
693
- <item id="section-10.1.lst0.a">
692
+ <blockList eId="sec__10__subsec_1__list_1">
693
+ <item eId="sec__10__subsec_1__list_1__item_a">
694
694
  <num>(a)</num>
695
695
  <p>foo</p>
696
696
  </item>
@@ -700,9 +700,9 @@ XML
700
700
 
701
701
  subject.adjust_blocklists(doc)
702
702
  doc.to_s.should == subsection(<<XML
703
- <blockList id="section-10.1.lst0">
703
+ <blockList eId="sec__10__subsec_1__list_1">
704
704
  <listIntroduction>intro</listIntroduction>
705
- <item id="section-10.1.lst0.a">
705
+ <item eId="sec__10__subsec_1__list_1__item_a">
706
706
  <num>(a)</num>
707
707
  <p>foo</p>
708
708
  </item>
@@ -711,4 +711,4 @@ XML
711
711
  )
712
712
  end
713
713
  end
714
- end
714
+ end