lib/metanorma/modspec/cleanup.rb in mn-requirements-0.1.8 vs lib/metanorma/modspec/cleanup.rb in mn-requirements-0.1.9
- old
+ new
@@ -72,10 +72,13 @@
requirement_subparts_to_blocks(reqt)
requirement_target_identifiers(reqt)
end
def requirement_target_identifiers(reqt)
- reqt.xpath("./classification[tag = 'target']/value[link]").each do |v|
+ reqt.xpath("./classification[tag][value/link]").each do |c|
+ %w(target indirect-dependency implements)
+ .include?(c.at("./tag").text.downcase) or next
+ v = c.at("./value[link]")
v.children = v.at("./link/@target").text
end
end
def requirement_metadata_to_component(reqt)