lib/asciidoctor/iso/validate_section.rb in metanorma-iso-1.3.23 vs lib/asciidoctor/iso/validate_section.rb in metanorma-iso-1.3.24
- old
+ new
@@ -20,11 +20,11 @@
@log.add("Style", f, "foreword contains subclauses") unless s.nil?
end
# ISO/IEC DIR 2, 15.4
def normref_validate(root)
- f = root.at("//references[title = 'Normative References']") || return
+ f = root.at("//references[@normative = 'true']") || return
f.at("./references | ./clause") &&
@log.add("Style", f, "normative references contains subclauses")
end
ONE_SYMBOLS_WARNING = "Only one Symbols and Abbreviated "\
@@ -166,10 +166,10 @@
ASSETS_TO_STYLE =
"//termsource | //formula | //termnote | //p[not(ancestor::boilerplate)] | "\
"//li[not(p)] | //dt | //dd[not(p)] | //td[not(p)] | //th[not(p)]".freeze
NORM_BIBITEMS =
- "//references[title = 'Normative References']/bibitem".freeze
+ "//references[@normative = 'true']/bibitem".freeze
# ISO/IEC DIR 2, 10.2
def norm_bibitem_style(root)
root.xpath(NORM_BIBITEMS).each do |b|
if b.at(Standoc::Converter::ISO_PUBLISHER_XPATH).nil?