Friday, November 09, 2007

Formatting Fixed, but Q: XHTML inside HTML?

Previous breaking on has now been fixed. It was a good opportunity to test out the Feeddigest support, and have to say they responded fairly quickly and fixed it efficiently. Always a bit wary of leaving comments to languish in wasteland forums, so great to find one that you can trust :)

On a related note, it's techie Question Time, yayyyy (like Jonathan Dimbleby talking to The Lone Gunmen). I noticed I have a mismatch - uses HTML, but my blog uses XHTML. As such, when the content of the latter gets imported into the former (via Javascript), it seems (to me) that there's an unholy alliance/transgenic hybridisation that I was trying to avoid. ("Behold! An HTML page spliced with an XHTML feed... with five asses!")

From a "technical" perspective, is this "bad"? The W3C Validator doesn't have any problem with the page, as it doesn't call the Javascript. And if bad, what's the best way of resolving it? Convert one to the other? Find some way to convert XHTML within an Atom feed to HTML?

Or can I just ignore it? :)

TBH, I'm asking mostly out of curiosity. It's not something I've noticed before, but with the increasing extent of syndication and cross-site content, I can't believe it's not an uncommon occurrence. That said, nor can I see anything in FeedDigest or FeedBurner that takes it into account.

Feed my face with your o(pi)nions!


David Wood said...

Simple - it's bad.

You must immediately convert to all XHTML.


Go now before it's too late!!

It's too late for me - off to bed.

Scribe said...

Hmm, that still doesn't help. The feedburner javascript used to include stuff spits things out via document.write, which is unavailable in XHTML (apparently. According to the "W3C", whoever they are.)

In which case, the best thing to do is probably do some kind of server-side URL fetching and content parsing myself, to turn XHTML feeds into HTML. This also gets rid of a semi-reliance on Javascript, which would be good.

Unfortunately, converting things to XHTML is more complex and annoying than it looks/should be...

David Wood said...

Sounds like an enormous time sucker to me... I'd leave well alone to be honest (which is kinda what I was alluding to above ;)