hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Uh Oh, Someone Saw the Smoke #

by why in cult

Tim Bray: Yep, Camping does seem to provide something not entirely unlike an application framework in a little file, provided of course you download and install several acres of infrastructure.

Sam Ruby: My issue is that there are a number of superficial signs that _why’s attention to detail appears to be somewhat… lacking.

I don’t want to start an argument here, but I have cared for every detail. Might I remind you:

said on 11 Jul 2006 at 11:58

How clever!! I want to print this and make a poster!

said on 11 Jul 2006 at 12:03

We do need to figure out what to do with relative URIs in Hobix… I’ve been avoiding the issue for some while by hard-coding absolute URIs in my entries, but that’s not a real solution at all.

Probably it has to be dealt with in the text processor before everything gets rolled into one HTML -ful string. I mean, we could probably parse into the HTML and fix URLs in the RSS output plugin but …

Hmm. Hpricot? What do you think?

said on 11 Jul 2006 at 12:30

Hmmm. First comment got eaten. Trying again.

I don’t want to start an argument here, but I have cared for every detail.

The above was done with a simple copy/paste. Don’t believe me, try it yourself. And the following is just to be ornery:

Don’t see it? What a pity. My point is that these types of things are what will convert people like Tim (or myself) from agreeable folk to being The Beta Tester From Hell.

With this in mind, I hereby throw down the virtual gauntlet. Either make your weblog consistently well-formed, or decide not to. If you decide not to, you can indicate that by dropping the misleading link to the W3C validator. Furthermore, either drop the use of relative URI references in your feed, or convert to a feed format with proper support for such constructs.

Are you up for the challenge?

said on 11 Jul 2006 at 12:34

OK, so the odd display in the face of a “smart quote” was just a preview artifact.

said on 11 Jul 2006 at 12:38

grabs popcorn

said on 11 Jul 2006 at 12:46

If there are bolts of inspiration flying about, could someone get hit by one about layout? I’d be delighted if redhanded played better with big fonts: all the comments and stories presently don’t expand to soak up the left margin, and people with long names have the right hand side of the name lost under the comment box. It would make it easier to read longish lines of code, too. Don’t take this as a complaint, just an RFE (Request For Enhancement). There’s so much good stuff coming from here I don’t want to stem the flow, but just to let you know the issue exists. Thanks. :-)

said on 11 Jul 2006 at 12:55

So far, Camping doesn’t look like it’ll actually get in the way of generating clean output.

But you know, Mr. Stiff, Sam’s right about well-formedness and URIs and validator links and so on. The Web isn’t a place, it’s a mesh of agreements (http://worldofends.com/) and the rules aren’t that hard to follow. I’d say just do it.

said on 11 Jul 2006 at 12:55

Ummm, that’s not a helicopter.

More like a Cessna.

said on 11 Jul 2006 at 13:11

said on 11 Jul 2006 at 13:18

Hehe, you guys made my day.

said on 11 Jul 2006 at 13:33

Sam’s permalink URIs in his atom feed break NetNewsWire.

said on 11 Jul 2006 at 13:46

I’m really trying to be civil, but that jab about the helicopter was really low!! In due time, I’ll respond to all of these, point-by-point, except I’m kind of slow (roughly fax machine speed.)

Oh, but Tim, thankyou for the very complete review of all the various problems. Changeset [130] decouples the database drivers so it’ll only load it if you use it. (Using Ruby’s autoload feature.) Installation will be easier when the next gems come out.

Good points, Sam. I will work on fixing this blog hopefully tomorrow or something.

said on 11 Jul 2006 at 14:36

hoyhoy: yup. And I did that explicitly to test an edge case. If, instead, I were to put an explicit xml:base at the top of the feed, NNW would be happy. But as it stands, I have an email in my in-box from Brent acknowledging that this is a bug/regression along with a promise that he will fix it in the next minor release.

That’s the benefit of clean and clear specifications.

Meanwhile, how does the RSS output plugin handle less-than characters in titles?

said on 11 Jul 2006 at 14:54

Sam: quite nicely thankyou—provided why is running Redhanded a reasonably current Hobix. A while back I know there were some RSS quoting bugs I had to fix in Hobix trunk.

said on 11 Jul 2006 at 14:55

(to why’s credit, I recall the quoting bugs were the fault of an upstream library which had to be worked around)

said on 11 Jul 2006 at 14:58

You know, at this point in my life, I’m beginning to think that string escaping and encoding is something that should be enforced by a language’s type system. For sufficiently capable typed languages at least.

said on 11 Jul 2006 at 15:09

Just looked up r121—it was a thing with REXML not requoting e.g. → in body text when it should. Titles always worked right.

said on 11 Jul 2006 at 15:18

MenTaLguY: it was a trick question. There is no right way to encode a less-than character in a title in RSS . If you show me an example weblog post, I can tell you which aggregators are likely to misinterpret it.

said on 11 Jul 2006 at 15:19

And … I just looked at the RSS “spec”. That was a trick question, wasn’t it?

Looking around, I see that it is conventional to have HTML in titles, which means single-scaping Hobix’s text-only titles is “wrong” as they should instead be double-escaped. Bother.

said on 11 Jul 2006 at 15:19

..aaaand, our posts missed each other. Okay.

said on 11 Jul 2006 at 15:20

I guess the only reasonable option is to strip less-thans, then.

said on 11 Jul 2006 at 15:23

Hmm, won’t there also be the same sorts of issues with ampersands?

said on 11 Jul 2006 at 15:28

MenTaLguY: I think Sam was referring to RSS ’s ambiguity regarding whether the title element should be treated as embedded HTML or plain text. In other words, are ‘<’ chars single-escaped or double-escaped? But that’s just a guess based on the fact that Sam specifically mentioned the title element. I’m guessing the question’s similar in intent to Sam asking about whether one’s REST webservice supports ETags.

_why: Woah, autoload makes me joyous. I shall henceforth be using it more often.

said on 11 Jul 2006 at 15:38

Sporkmonger: Yeah, I got that eventually. Not something I’d really thought about before, sadly. For RSS <description> elements you’ve got no choice but to assume HTML , but with <title> the split between the HTML and non-HTML worlds is more even. Can’t win there really, except by stripping down to the common subset valid in both interpretations.

said on 11 Jul 2006 at 15:58

Can’t win there really, except by stripping down to the common subset valid in both interpretations.

Actually, you have three choices .

Don’t let this happen to you.

said on 11 Jul 2006 at 16:25

You don’t have to be perfect or follow the rules to be admirable and an inspiration.

I say keep up the good work, and shazbutt to anybody that is too lazy to help fix your tool or find another until they’re satisfied with yours.

I mean come on, coming in here and whining about those silly W3 badges? What is this, 2003? I thought we all lightened up a bit.

http://molly.com/joke.php

said on 11 Jul 2006 at 16:27

While we could remove the RSS feed from the default Hobix template, I don’t forsee us jettisoning RSS support in Hobix entirely, honestly. But I am going to add title stripping on the RSS output and upgrade Hobix’s existing Atom support to Atom 1.0.

FWIW , Hobix does currently generate both RSS and Atom feeds by default (hence Redhanded already has one, although it looks like it still suffers from the aforementioned REXML bug). It’s up to the web designer which feed(s) they choose to advertise or disable.

said on 11 Jul 2006 at 16:35

Er, already has an Atom feed, I mean.

said on 11 Jul 2006 at 17:46

you guys all seem to know what’s going up. how do I do include the bold tags in my RSS title?

said on 11 Jul 2006 at 17:50

Dropped comment again. Trying it in segments:

I don’t forsee us jettisoning RSS support in Hobix entirely, honestly

That phrase cracks me up. Are sites that provide valid XHTML “jettisoning” HTML ? Or while people continue refer to it generically as HTML anyway, just like they are doing with Atom. The term RSS is now as generic, and as disposable, as Kleenex.

How about .gif vs .jpg vs .png?

said on 11 Jul 2006 at 17:51

People don’t want to chose between the same data in multiple feed formats, they want one that works. You can even permanently redirect a feed of one format to another one of another format without causing a problem.

And once you have solved the “might be HTML , might not” problem in RSS titles – remembering that people are prone to say things like R&D – don’t forget to double back and solve the relative URI problems.

said on 11 Jul 2006 at 18:50

I’m amenable to making Atom the sole default for feeds in the initial Hobix template, but we’re keeping the RSS plugin just like we’re keeping the okaynews plugin.

In turn, I don’t need to solve the overall RSS title problem, I just need to be able to generate RSS feeds that are unambiguous to readers. The easiest way to accomplish that is to strip (rather than try to escape) any characters which signal the start of a special token in HTML , when emitting the RSS title. Brutal, but if that bothers people they can always switch to Atom.

Lastly, the relative URI problem is one which needs to be solved anyway. A single Hobix entry may appear on several different HTML pages; if a URI reference in the entry content is relative it either needs to be adjusted or made absolute (note that it may be aggregated with other entries on the same page—it’s not just a matter of setting up a base href). If we solve that for the HTML pages, we may as well do it for RSS .

said on 11 Jul 2006 at 19:04

By the way, if we’re going to continue this thread, it might help if we clearly distinguished between RedHanded the site and Hobix the CMS (upon which the former is built). I’m really only in a position to answer for the latter.

said on 11 Jul 2006 at 19:25

On a totally other note, I’ve added the workaround for the REXML quoting bug to the Atom plugin, as of r129. Good times.

said on 11 Jul 2006 at 19:53

Annnnnnd… r130 gives us valid Atom 1.0. Still some nicities that need dealing with though like the self-link.

said on 11 Jul 2006 at 20:45

MenTaLguY: I was just about to comment on that :P

said on 12 Jul 2006 at 06:51

The easiest way to accomplish that is to strip (rather than try to escape) any characters which signal the start of a special token in HTML , when emitting the RSS title.

That might affect the channel title in the hobix feed

A single Hobix entry may appear on several different HTML pages; if a URI reference in the entry content is relative it either needs to be adjusted or made absolute

You might find some useful information halfway down this page

If you ever want to support inline SVG or MathML, we should talk further.

said on 12 Jul 2006 at 10:21

That might affect the channel title in the hobix feed

Yeah, it would. If that bugs why, it’s not hard to switch the feed to Atom (I don’t have access to hobix.com to make changes like that).

Regarding xml:base-for-solving-HTML-inclusion-reference-problems, I wish it were a general option. I mean, it’s obviously fine for Atom, but for (X)HTML pages on the web site itself? So long as Internet Explorer continues to treat XHTML as funny-looking HTML rather than XML (or the IE userbase drops low enough that we can exclude it) we’re kind of boned. To some extent that goes for SVG and MathML too.

That said, if someone wanted to make an XHTML site in Hobix that didn’t need to work in IE, it’s already dead trivial to write a Hobix template which has xml:base defined on the <div>s or whatever containing individual entries. Inline SVG and MathML also require no special support from Hobix.

said on 12 Jul 2006 at 10:28

Is there a good place to discuss Hobix? I tried installing it. I have Ruby installed, but on Ubuntu, one needs to separately install rdoc. This caused the Hobix installation to fail. Installing rdoc and then retrying resulting in Hobix declaring that I already had the latest version installed.

Now I get
/usr/local/lib/site_ruby/1.8/hobix/commandline.rb:25:in `join': can't convert nil into String (TypeError)
        from /usr/local/lib/site_ruby/1.8/hobix/commandline.rb:25
        from /home/rubys/bin/hobix:2
said on 12 Jul 2006 at 10:30

(If we started e.g. filtering everything through Hpricot to do URI fixups, of course, we would necessarily make a distinction between HTML and non-HTML content.)

said on 12 Jul 2006 at 10:46

Sam: really I wouldn’t install anything but hobix from SVN trunk at this point. <= 0.4 has lots of issues. I am trying to get a less problematic 0.5 out the door.

You will need more than just rdoc. I don’t have a full list in front of me, but you’ll need RedCloth and some other Ruby libraries which should be part of the main Ruby package but are not under Ubuntu.

Recommendation: just grab all the packages generated by Ubuntu’s Ruby source package to be safe (but I know you don’t need the Tk binding).

Further hobix-specific discussion is probably best carried out under the auspices of the Hobix mailing list.

said on 12 Jul 2006 at 19:25

I think too many people take stuff like this as an attack—it’s easy to do so. But, I think we need more people like this in the Ruby community. We need more people to educate us and to make us honest. There’s nothing at all wrong with that, and it can only make what we produce better. I have thin skin myself though, so I’d probably be crying about now….

said on 14 Jul 2006 at 10:51

Have you taken into account the whale’s perspective on this problem?

I mean I think this helicopter could cause some serious issues for mamalian aquatic friend here!

said on 16 Jul 2006 at 21:38

But seriously, pendant is right… that’s not a helicopter. I dont see how you can bounce a cesna off a whale. Seems like a big problem with the framework.

said on 27 Jul 2006 at 13:38

The framework is not really the bouncing of the helicopter off the whale, it is the distance between the whale the helicopter and the boat. The whale is just incidental, it could be replaced by a cement truck or Steve McQueen.

Comments are closed for this entry.