inukshuk/citeproc-ruby — Issue #3: citeproc-ruby cannot deal with XML comments in CSL files
Author: vanto
Created: 2011-12-07 13:21:44+00:00
State: open

XML comments (i.e. ) in CSL files cause citeproc-ruby to die with the following error:

```
ERROR CiteProc : failed to process item {"id"=>, "author"=>[Edgar Allen Poe], "title"=>Poetry, Tales, and Selected Essays, "type"=>book, "issued"=>{"date-parts"=>[[1996]], "literal"=>nil}, "editor"=>[Patrick F. Quinn, G.R. Thompson], "publisher"=>Library of America, "publisher-place"=>New York}:
undefined method `evaluate' for {"node"=>"CSL::Nodes::Node"}:CSL::Nodes::Node
```

I'm pretty sure it is because the Node factory does not know the `Comment` XML node and thus creates a Node instance. This instance, however, does not have a evaluate method.

I currently see three possible solutions:

1. Ignore comments during parsing and do not create node objects for comments at all.
2. Define a CommentNode which basically does nothing.
3. Put an `evaluate` method to Node

``` ruby
def evaluate(data, processor)
false
end
```

All options have (little) pros and cons, so I leave it up to you to decide :)