I think it might be somewhat beneficial for everyone in this thread to read at least some of Fandom Wank's (extensive) coverage of this incident and the trial
. (That link goes to the wiki page, which has links to many of the actual reports and such). (Here's
a link to the first Wank Report).
The story as I understand it can basically be summarized thusly:
1. HP Lexicon guy asks JKR if he can publish his book. JKR says no, she's going to do her own, eventually.
2. Later, HP Lexicon guy (HPLG) gets a publisher (RDR books) to publish anyway.
3. Cease and Desist letters are exchanged. RDR ignores them and continues to try to sell the book.
4. JKR/Warner Bros. Lawyers ask RDR/HPLG if they can see the book. RDR says to print out the website.
5. JKR/Warner Bros. point out that this is clearly copyright infringement, since the Lexicon contains a great deal of text lifted directly from the HP books/spinoff books (specifically Fantastic Beasts and Where to Find Them)
6. RDR continues to ignore all of the legal threats etc. and generally make themselves look like idiots.
7. Court smackdowns.
I would have some sympathy for the guy if it wasn't for the atrocious way in which his side handled the case. The fact is that he asked JKR if he could publish his book based on her material, she said no, and he tried to do it anyway. During the case, he claimed that the book was legitimate under copyright law because it was criticism/analysis, which was pretty blatantly untrue (it's also why the bit about "print out the website, morons" is relevant, since the only criticism/analysis that was on HPL at the time was written by other people who hadn't been asked if the guy who ran the Lexicon could use their work in his book, and it later became apparent that they weren't going to publish that anyway)
tl;dr: There are legitimate books of commentary on HP that are legal and are published, though most of those people worked with the copyright holders to make sure that there was no infringement going on, and the primary purposes of these books are criticism/analysis or commentary, which are legal. The Lexicon people did the exact opposite of this, and rightly got smacked down in court.