Skip to content

Commit

Permalink
namespace ordering for OCR documents should not matter
Browse files Browse the repository at this point in the history
  • Loading branch information
peetucket committed Jun 12, 2024
1 parent 9b2257a commit aaf5a1e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/alto_payload_delimited_transformer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(content)

def namespaces
@namespaces ||= begin
alto_ns = document.namespaces.values.first { |ns| ns.include? 'standards/alto/ns' }
alto_ns = document.namespaces.values.find { |ns| ns.include? 'standards/alto/ns' }
{ alto: alto_ns || 'http://www.loc.gov/standards/alto/ns-v3#' }
end
end
Expand Down
Loading

0 comments on commit aaf5a1e

Please sign in to comment.