{5} Assigned, Active Tickets by Owner (Full Description) (5 matches)

List tickets assigned, group by ticket owner. This report demonstrates the use of full-row display.

why (5 matches)

Ticket Summary Component Milestone Type Created
Description
#48 Hpricot Memory Leak Problem lib/hpricot 0.5 defect 01/17/2007

I use hpricot on my long-living daemon program. I think some memory leak is in on the hpricot. As time goes by, program's memory usage is up and up, increasingly. Here's my just sample test code showing this problem.

url = "http://blabla..."
def do_hpricot(url)
  h = Hpricot(open(url)).search("div#entries") do
    entry.at("div.from")['href']
  end
end
loop do
  do_hpricot(url)
  sleep rand(1)
end 

Or, Are there any other way to collect this??


#12 Using Wildcard Search for ID (CSS and XPATH) component1 0.5 defect 10/03/2006

(doc/"*[@id]/") or (doc/"//*[@id]" does nothing

(doc/"//*@id") is just considered wrong.


#64 Amazon.com XPath problem ext/hpricot_scan 0.5 defect 02/16/2007

This code:

require 'rubygems'
require 'hpricot'
require 'open-uri'

doc = Hpricot(open('http://www.amazon.com/s/ref=sr_nr_i_0/105-4295811-9538065?ie=UTF8&keywords=ruby&rh=i:aps,k:ruby,i:stripbooks&page=1'))
titles = doc/"/html/body/table/tr/td/table/tr/td/div/table/tr/td/table/tr/td/table/tr/td/table/tr/td/table/tr/td/table/tr/td/table/tr/td/a/span"
p titles.size

prints "4".

However, in Firefox, this XPath:

/html/body/table/tbody/tr/td/table/tbody/tr/td/div/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr/td/a/span

returns 12 results. (It is the same XPath, just the Firefox one has additional tbody tags) Since your quest is to make hpricot as FF compliant as possible,I guess this is not right, or?


#59 Support XPaths with predicate expressions ext/hpricot_scan enhancement 02/08/2007

When singling out nodes, it is often useful to be able to point at some node along the path, using a basic transform along the lines of this. The latter two expressions are different ways of phrasing the same thing, but the shorter version does not work:

doc.search('//tr/td/a[@href^="diary_read"]').length # => 20 (is correct)
doc.search('//tr[td/a[@href^="diary_read"]]').length # => 561 (want 20!)
doc.search('//tr/td/a[@href^="diary_read"]/../..').length # => 20 (okay)

I'd love to have all three render the same amount of nodes so I won't have to translate my XPath thoughts into HpricotPath? quite so often. There wouldn't happen to be any chances of metaprogramming up something cool that would let a real XPath engine explore Hpricot's inner state to run queries against it, using W3C style XPath, barfing on everything else?


#20 Support XPath "not" expression lib/hpricot 0.5 enhancement 10/22/2006

If I'm using Hpricot to, say, naughtily parse an Atom file, I might have an XPath query like this:

/feed/*[not(self::entry)]

Unfortunately, however, this sends a @doc.search('/feed/*[not(self::entry)]') into a seemingly infinite loop (not entirely proven, as I don't have a black hole for testing purposes). The problem appears to be the not() expression.

I'm running on the latest source build (as 0.4 gives an error when you try assigning something or another to a MatchData? object, which is naughty). Is this just a piece of XPath Hpricot isn't meant to support yet?


Note: See TracReports for help on using and creating reports.