Re: Why polyglot is needed

Michael[tm] Smith writes:

> "Henry S. Thompson" <ht@inf.ed.ac.uk>, 2013-03-19 19:05 +0000:
>
>> My university serves html files as text/html.  I have no control over
>> that.
>
> What kind of Web server does your university use? 

A centralised CMS which I can only upload documents into.

> You really don't have the ability to add an .htaccess file or
> equivalent?

_I_ do, in certain limited cases, but 95% of the University staff
don't, and wouldn't know how to even if they could.

> If you lack anything like that, it kind of sounds like your
> university's system is broken, from a user-experience point of
> view. Why don't you ask your university to fix that?

Believe me, I've tried.  But the Univ. of Edinburgh isn't the point.
The point is this is a common situation as technologies transition.
Dealing with legacy is part of our job.  There are _lots_ of other
large companies out there who use any one of dozens of CMS systems to
manage their websites, all of which have similar properties.

>> If I don't produce polyglot, browsers do the wrong thing with,
>> for instance [1], void tags.
>
> It's not the wrong thing. It's the different-from-XML-thing or the
> behavior-that-browsers-have-consistently-had-before-XML-was-invented thing.

Sorry, badly phrased on my part -- they don't do what I expected, or
what they would have done if I could have gotten the media type right.

>> The document at [1] looks like this:
>> 
>> <!DOCTYPE html>
>> <html xmlns="http://www.w3.org/1999/xhtml">
>>   <head>
>>     <title>test void element closure</title>
>>     <style type="text/css">a {background-color: pink}</style>
>>   </head>
>> 
>>   <body>
>>     <h1>test void element closure</h1>
>>     <p><a name="test" />Inside or outside?</p>
>
> That's not valid per HTML5. The name attribute is not allowed on the <a>
> element. There is now never any good reason to use it. You can just use an
> id attribute on the p element to achieve the same effects.

Yes, I do know that -- it was just the quickest way I could think of
to illustrate the parsing point.  Take the name attribute off, and the
example still misbehaves exactly as I said it would.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Received on Tuesday, 19 March 2013 19:41:19 UTC