Friday August 29, 2003
|
Vanity Foul Dedicated to the wanderings of an egotistical mind. |
|
Re: Atom and Digester In between trips to the hospital, and sleeping, I had a little time to work on resolving my issue with Digester parsing Atom XML. As suggested in my comments and in the Digester-user list, I implemented a custom Rule and Handler. It took quite a bit of trial-and-error, but I got it working. Look for real results soon. It's a boy Baby Boy Lavandowska was born at 7:29 PM Central Time. He weighed 7 lbs, and is 21 inches long. After nearly 12 hours of contractions, it only took 20 minutes of pushing for him to make his appearance (he beat both his doctor and the in-house doctor). His nurse had only just come on duty, and she did a great job! Mother and Son are doing well, and no, we haven't settled on a name yet. ( Aug 26 2003, 10:06:16 PM ) Personal Permalink Comments [11] [Trackback] Atom and XOM Digester wasn't cutting it (haven't received that custom Rule yet), so I thought I'd try XOM. Well, XOM thinks the example Entry isn't WellFormed: I don't know what isn't well-formed about that, but since <content> could contain "nasty" non-X HTML, wellformedness shouldn't be a requirement (damn users, can never count on them to do the right thing!). My search for another solution will continue tonight (Jason, wanna send me that package your mentioned in my comments?). Good night, and thanks for your support. Atom and Digester As I mentioned in my previous post, I'm lazy. So I'm using Digester to parse the AtomAPI XML - but its falling down in one regard: <content>can contain <html></content>. And Digester sees this as just more XML, so the contents on the content tag only get assigned if there is no html. Some general websearching, and searching on the Digester-user list, revealed one other person with a similar concern earlier this year. I've sent him an email, asking if he can supply more information on his solution. If not, or if that doesn't solve the issue, I'm afraid I'll have to resort to "hand-parsing" the AtomAPI. I'm lazy, I don't wanna do that. But again, it may become necessary as the AtomAPI allows for adding arbitrary vendor-specific tags - <mt:fooBar> for example - and my Digester rules don't cover that at the moment. I do plan on re-expressing the rules via Digester's rules.xml capability though; that may allow for the flexibility necessary....
And then on the Roller site... Since I've begun contributing to Roller I've received a couple attributions. It's always nice to be recognized, but Dave is grand enough to mention each of my contributions. Atom4J In a definite "me too" bid, I've begun work on making Roller support nEcho/Pie/Atom. Step one was to allow Roller to emit an Atom feed. Check! When I get to upgrading Vanity Foul tonight you'll be able to get the feed. The content type is application/x.atom-xml so your browser probably won't show it (I had to select a text editor for it). Next I've begun work on supporting the AtomAPI. That's a lot of XML to process, and I'm lazy. So I've started "Atom4J", an Atom support library for Java (duh!). When it's somewhere approaching usable I'll probably start a SourceForge project (or java.net?). Currently there are inconsistencies as the "spec" fluxuates almost daily; the current feed spec and the AtomAPI Entry share a passing familiarity but that's about it. Update: I think I confused the AtomAPI with the Atom feed, and perhaps the content type of the feed should just be text/xml? I cannot find a true defination anywhere, but Roller now conforms to Maximal Atom.
Re: java.blogs best practices Oops, I just broke one of them. Since I am just a nobody, no one with the status of Norman Richards (there's another rule broken), I doubt anyone cares, but I prefer the use of "Re:" since it alerts readers to the fact that I am commenting on something they may have seen elsewhere. But now I'm talking about blogging in general aren't I? Norman, are you chewing gum, or is that your tongue in your cheek? Re: showRecentEntries() I finally followed up on myself: I used Terminus' showRecentEntries(), but eased the implementation somewhat. I added the following to the top of my _Weblog page:
and then in my navbar I added If you compare my version to Terminus's, you'll see I've eliminated the need for a separate page (just put the display into the macro). Someday I'll get around to adding this macro to Roller's stock macros. Aug 11th: The above should work in Roller 0.9.7 (what is currently running on FreeRoller). I've committed a new macro for 0.9.8 into Roller's cvs (it won't work properly on 0.9.7). Werner, thanks for the kick-in-the-pants!
|
|
||||||||