def children_to_string(children)
      children.map do |child|
        if child.text?
          child.content
        else
          if child.name == 's'
            compressed_spaces = child.attributes['c'].to_s.to_i
            # no explicit number means a count of 1:
            compressed_spaces == 0 ? ' ' : ' ' * compressed_spaces
          else
            child.content
          end
        end
      end.join
    end
def children_to_string(children)
      children.map do |child|
        if child.text?
          child.content
        else
          if child.name == 's'
            compressed_spaces = child.attributes['c'].to_s.to_i
            # no explicit number means a count of 1:
            compressed_spaces == 0 ? ' ' : ' ' * compressed_spaces
          else
            child.content
          end
        end
      end.join
    end
helper method to convert compressed spaces and other elements within
 an text into a string
 FIXME: add a test for compressed_spaces == 0. It's not currently tested.