tenderlove / nokogiri

Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser with XPath and CSS selector support.

This URL has Read+Write access

nokogiri / FFI-TODO
100644 69 lines (62 sloc) 3.143 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
-*- org -*-
 
* DONE implement xpath custom handlers
* [9/9] code review (compare C to FFI side by side)
  - [X] xml/node.rb
  - [X] xml/document.rb
  - [X] xml/node_set.rb
  - [X] xml/xpath_context.rb
  - [X] xml/cdata.rb
  - [X] html/document.rb
  - [X] html/entity_lookup.rb
  - [X] reader.rb
  - [X] xslt.rb, xslt/stylesheet.rb
* DONE code review of function prototypes
* [7/7] implement classes:
  - [X] HTML::ElementDescription
  - [X] XML::Schema
  - [X] HTML::EntityLookup
  - [X] XML::EntityReference
  - [X] XML::RelaxNG
  - [X] SAX::PushParser
  - [X] ProcessingInstruction
* miscellaneous issues
*** DONE blanks being escaped in output
    CLOSED: [2009-04-30 Thu 19:03]
*** TODO heisenbug:
test_attribute_roundtrip(TestReader):
NoMethodError: undefined method `attribute_nodes' for [-617503368]:Array
    /home/mike/code/nokogiri/lib/nokogiri/ffi/xml/reader.rb:42:in `attribute_nodes'
    /home/mike/code/nokogiri/lib/nokogiri/xml/reader.rb:14:in `attributes'
    ./test/test_reader.rb:81:in `test_attribute_roundtrip'
    /home/mike/code/nokogiri/lib/nokogiri/xml/reader.rb:21:in `call'
    /home/mike/code/nokogiri/lib/nokogiri/xml/reader.rb:21:in `each'
    ./test/test_reader.rb:80:in `test_attribute_roundtrip'
    /usr/lib/ruby/gems/1.8/gems/mocha-0.9.3/lib/mocha/test_case_adapter.rb:69:in `__send__'
    /usr/lib/ruby/gems/1.8/gems/mocha-0.9.3/lib/mocha/test_case_adapter.rb:69:in `run'
 
test_attributes(TestReader):
RangeError: 0xdb387178 is recycled object
    /home/mike/code/nokogiri/lib/nokogiri/ffi/structs/common_node.rb:15:in `_id2ref'
    /home/mike/code/nokogiri/lib/nokogiri/ffi/structs/common_node.rb:15:in `ruby_node'
    /home/mike/code/nokogiri/lib/nokogiri/ffi/xml/node.rb:252:in `wrap'
    /home/mike/code/nokogiri/lib/nokogiri/ffi/xml/reader.rb:41:in `attribute_nodes'
    /home/mike/code/nokogiri/lib/nokogiri/xml/reader.rb:14:in `attributes'
    ./test/test_reader.rb:69:in `test_attributes'
    /home/mike/code/nokogiri/lib/nokogiri/xml/node.rb:288:in `map'
    /home/mike/code/nokogiri/lib/nokogiri/xml/reader.rb:21:in `call'
    /home/mike/code/nokogiri/lib/nokogiri/xml/reader.rb:21:in `each'
    ./test/test_reader.rb:69:in `map'
    ./test/test_reader.rb:69:in `test_attributes'
    /usr/lib/ruby/gems/1.8/gems/mocha-0.9.3/lib/mocha/test_case_adapter.rb:69:in `__send__'
    /usr/lib/ruby/gems/1.8/gems/mocha-0.9.3/lib/mocha/test_case_adapter.rb:69:in `run'
 
* jruby-only bugs
*** DONE annoying "warning: too many arguments for format string" messages everywhere
*** TODO lingering syntax error issues. try test/xml/test_document.rb
*** TODO how to lookup and find libxml2.so and libxslt.so?
 
* TODO convert structs to using layout() instead of FFI::Generator stubs
*** TODO then remove the 'rake ffi' task and supporting functions
 
* TODO open jira tickets: support varags in callbacks (needed for syntax error and sax error)
* figure out how to cache the ruby objects (nodes and documents) without using Objectspace.
 
* use (new) nested struct support in FFI?
* do we have string encoding issues?
* i feel like we should refactor reader/writer/closer io callbacks
* rdoc documentation? shit.