lib/asciidoctor/standoc/cleanup_xref.rb
def origin_cleanup(xmldoc)
        xmldoc.xpath("//origin/concept[termref]").each do |x|
          t = x.at("./termref")
          x.replace(t)
        end
        xmldoc.xpath("//origin").each do |x|
          x["citeas"] = @anchors&.dig(x["bibitemid"], :xref) or
            @log.add("Crossreferences", x,
                     "#{x['bibitemid']} does not have a corresponding anchor "\
                     "ID in the bibliography!")
          extract_localities(x) unless x.children.empty?
        end
      end
# extending localities to cover ISO referencing
extending localities to cover ISO referencing
extending localities to cover ISO referencing
def origin_cleanup(xmldoc)
        xmldoc.xpath("//origin/concept[termref]").each do |x|
          t = x.at("./termref")
          x.replace(t)
        end
        xmldoc.xpath("//origin").each do |x|
          x["citeas"] = @anchors&.dig(x["bibitemid"], :xref) or
            @log.add("Crossreferences", x,
                     "#{x['bibitemid']} does not have a corresponding anchor "\
                     "ID in the bibliography!")
          extract_localities(x) unless x.children.empty?
        end
      end
def origin_cleanup ( xmldoc ) xmldoc . xpath ( "//origin/concept[termref]" ) . each do | x | t = x . at ( "./termref" ) x . replace ( t ) end xmldoc . xpath ( "//origin" ) . each do | x | x [ "citeas" ] = @anchors &. dig ( x [ "bibitemid" ] , :xref ) or @log . add ( "Crossreferences" , x , "#{x['bibitemid']} does not have a corresponding anchor " "ID in the bibliography!" ) extract_localities ( x ) unless x . children . empty? end end
extending localities to cover ISO referencing
extending localities to cover ISO referencing
xmldoc