decoupling from HTML

Brad Fitzpatrick brad at danga.com
Tue Jun 28 09:57:50 PDT 2005


On Tue, 28 Jun 2005, Mario Salzer wrote:

> If now HTML/XML parsers check for the presence of <html>,</head>
> or <body> tags before actually reading out the two <link> tags,
> they deprive themselves from supporting any other XML formats
> which were especially designed with 'html compatibility' in mind.

The reason the head checks were done in Net::OpenID::Consumer was to
prevent people from hi-jacking other people's webpages by leaving
comments/posts (which their software didn't strip) containing link tags.

But even a regular expression to search for any link tag after we
ascertain that the document isn't HTML (say, no <html> or <body> or
<head>), that's still kinda lame.  I suppose workable, though, if the
regexp allows a namespace... but I'd in that case prefer a full-on XML
parser so we can match on the /correct/ namespace.

In practice, though, I imagine OpenID will be tied to HTML/XHTML, and I
think that'll be fine.

If you have a proposal though that doesn't add tons of complexity for a
couple geeks doing XML+XSLT to make their homepage, I'm all ears.

- Brad


More information about the yadis mailing list