249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
# File 'lib/slaw/za/act_nodes.rb', line 249
def to_xml(b, idprefix, i=0)
if statement.is_a?(NumberedStatement)
attribs = {id: idprefix + statement.num.gsub(/[()]/, '')}
else
attribs = {id: idprefix + "subsection-#{i}"}
end
idprefix = attribs[:id] + "."
b.subsection(attribs) { |b|
b.num(statement.num) if statement.is_a?(NumberedStatement)
b.content { |b|
if blocklist and blocklist.is_a?(Blocklist)
if statement.content
blocklist.to_xml(b, idprefix, i) { |b| statement.content.to_xml(b, idprefix) }
else
blocklist.to_xml(b, idprefix, i)
end
else
statement.to_xml(b, idprefix)
end
}
}
end
|