Skip to content

Commit

Permalink
Metadata tracks subdoctype: metanorma/metanorma-itu#514
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed May 9, 2024
1 parent 99ad00a commit 923f5ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/isodoc/html_function/postprocess.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def resize_images(docxml)
docxml.xpath("//*[local-name() = 'img' or local-name() = 'svg']")
.each do |i|
loc = image_localfile(i) or next
require "debug"; binding.b
i["width"], i["height"] = Vectory::ImageResize.new
.call(i, loc, @maxheight, @maxwidth)
end
Expand Down
2 changes: 2 additions & 0 deletions lib/isodoc/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def doctype(isoxml, _out)
set(:doctype, status_print(b))
b1 = isoxml&.at(ns("//bibdata/ext/doctype#{currlang}"))&.text || b
set(:doctype_display, status_print(b1))
b = isoxml&.at(ns("//bibdata/ext/subdoctype#{NOLANG}"))&.text || return
set(:subdoctype, status_print(b))
end

def docstatus(xml, _out)
Expand Down
2 changes: 2 additions & 0 deletions spec/isodoc/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<keyword>KW3</keyword>
<ext>
<doctype>international-standard</doctype>
<subdoctype>vocabulary</subdoctype>
</ext>
</bibdata>
<metanorma-extension>
Expand Down Expand Up @@ -174,6 +175,7 @@
:stage=>"Committee Draft",
:stage_display=>"Committee Draft",
:stageabbr=>"CD",
:subdoctype=>"Vocabulary",
:substage=>"Withdrawn",
:substage_display=>"Withdrawn",
:title_footnote=>["A footnote", "Another footnote"],
Expand Down

0 comments on commit 923f5ec

Please sign in to comment.