def fetch_by_issn(issn)
      xml = fetch_xml(issn)


      results = BentoSearch::Results.new.concat(
        xml.xpath("./rdf:RDF/rss:item", xml_ns).collect do |node|
          item = BentoSearch::ResultItem.new

          item.format = "Article"

          item.issn   = issn # one we searched with, we know that!

          item.title  = xml_text(node, "rss:title")
          item.link   = xml_text(node, "rss:link")

          item.publisher      = xml_text(node, "prism:publisher") || xml_text(node, "dc:publisher")
          item.source_title   = xml_text(node, "prism:PublicationName")
          item.volume         = xml_text(node, "prism:volume")
          item.issue          = xml_text(node, "prism:number")
          item.start_page     = xml_text(node, "prism:startingPage")
          item.end_page       = xml_text(node, "prism:endingPage")

          # Look for something that looks like a DOI in dc:identifier
          node.xpath("dc:identifier").each do |id_node|
            if id_node.text =~ /\ADOI (.*)\Z/
              item.doi = $1
              # doi's seem to often have garbage after a "; ", especially
              # from highwire. heuristically fix, sorry, a real DOI with "; "
              # will get corrupted.
              if (parts = item.doi.split("; ")).length > 1
                item.doi = parts.first
              end

              break
            end
          end

          # authors?
          node.xpath("dc:creator", xml_ns).each do |creator_node|
            name = creator_node.text
            name.strip!

            # author names in RSS seem to often have HTML entities,
            # un-encode them to literals.
            name = HTMLEntities.new.decode(name)


            item.authors << BentoSearch::Author.new(:display => name)
          end

          # Date is weird and various formatted, we do our best to
          # look for yyyy-mm-dd at the beginning of either prism:coverDate or
          # dc:date or prism:publicationDate
          date_node = xml_text(node, "prism:coverDate") || xml_text(node, "dc:date") || xml_text(node, "prism:publicationDate")
          if date_node && date_node =~ /\A(\d\d\d\d-\d\d-\d\d)/
            item.publication_date = Date.strptime( $1, "%Y-%m-%d")
          elsif date_node
            # Let's try a random parse, they give us all kinds of things I'm afraid
            item.publication_date = Date.parse(date_node) rescue ArgumentError
          end

          # abstract, we need to strip possible HTML tags (sometimes they're
          # there, sometimes not), and also decode HTML entities. 
          item.abstract   = xml_text(node, "rss:description").try do |text|            
            HTMLEntities.new.decode(strip_tags(text))
          end

          item
        end
      )

      # Items seem to come back in arbitrary order, we want to sort
      # by date reverse if we can
      if results.all? {|i| i.publication_date.present? }
        results.sort_by! {|i| i.publication_date}.reverse!
      end

      fill_in_search_metadata_for(results)

      return results
    end
def fetch_by_issn(issn)
      xml = fetch_xml(issn)


      results = BentoSearch::Results.new.concat(
        xml.xpath("./rdf:RDF/rss:item", xml_ns).collect do |node|
          item = BentoSearch::ResultItem.new

          item.format = "Article"

          item.issn   = issn # one we searched with, we know that!

          item.title  = xml_text(node, "rss:title")
          item.link   = xml_text(node, "rss:link")

          item.publisher      = xml_text(node, "prism:publisher") || xml_text(node, "dc:publisher")
          item.source_title   = xml_text(node, "prism:PublicationName")
          item.volume         = xml_text(node, "prism:volume")
          item.issue          = xml_text(node, "prism:number")
          item.start_page     = xml_text(node, "prism:startingPage")
          item.end_page       = xml_text(node, "prism:endingPage")

          # Look for something that looks like a DOI in dc:identifier
          node.xpath("dc:identifier").each do |id_node|
            if id_node.text =~ /\ADOI (.*)\Z/
              item.doi = $1
              # doi's seem to often have garbage after a "; ", especially
              # from highwire. heuristically fix, sorry, a real DOI with "; "
              # will get corrupted.
              if (parts = item.doi.split("; ")).length > 1
                item.doi = parts.first
              end

              break
            end
          end

          # authors?
          node.xpath("dc:creator", xml_ns).each do |creator_node|
            name = creator_node.text
            name.strip!

            # author names in RSS seem to often have HTML entities,
            # un-encode them to literals.
            name = HTMLEntities.new.decode(name)


            item.authors << BentoSearch::Author.new(:display => name)
          end

          # Date is weird and various formatted, we do our best to
          # look for yyyy-mm-dd at the beginning of either prism:coverDate or
          # dc:date or prism:publicationDate
          date_node = xml_text(node, "prism:coverDate") || xml_text(node, "dc:date") || xml_text(node, "prism:publicationDate")
          if date_node && date_node =~ /\A(\d\d\d\d-\d\d-\d\d)/
            item.publication_date = Date.strptime( $1, "%Y-%m-%d")
          elsif date_node
            # Let's try a random parse, they give us all kinds of things I'm afraid
            item.publication_date = Date.parse(date_node) rescue ArgumentError
          end

          # abstract, we need to strip possible HTML tags (sometimes they're
          # there, sometimes not), and also decode HTML entities. 
          item.abstract   = xml_text(node, "rss:description").try do |text|            
            HTMLEntities.new.decode(strip_tags(text))
          end

          item
        end
      )

      # Items seem to come back in arbitrary order, we want to sort
      # by date reverse if we can
      if results.all? {|i| i.publication_date.present? }
        results.sort_by! {|i| i.publication_date}.reverse!
      end

      fill_in_search_metadata_for(results)

      return results
    end
returns an array of BentoSearch::ResultItem objects, representing
 items.