These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:11 pm Advanced search

YouTube Validation

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

YouTube Validation

Postby freeTinker » Sat Jan 29, 2011 10:03 pm

Please help me to understand this, I have pages with <iframe>s for embedding YouTube videos. They never validated to XHTML-Strict, but rather than lose function (ie; additional presentation via iPad [no-flash]) I was content validating them as XHTML-Transitional

All fine and good...

So I now put new pages together and validate everything to HTML5, and my <iframe> codes all validate?!?!

I get the philosophy that HTML5 be backwards compatible, but it kinda feels like I am making a technically-backwards step validating to HTML5

What am I missing?
freeTinker
<h5>
 
Posts: 14
Joined: Sun Jan 23, 2011 11:34 am
Location: USA-MA

Postby JAB Creations » Sun Jan 30, 2011 6:20 am

I have been working on adapting the XHTML 1.1 doctype to allow iframe elements though I've only managed to get the attributes to validate. I can't figure out how to deal with the last issue however...

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
[
<!ENTITY % special.extra "iframe">
<!ELEMENT iframe EMPTY>
<!ATTLIST iframe border CDATA #IMPLIED frameborder (0|1) "0" id ID #IMPLIED onfocus CDATA #IMPLIED scrolling (yes|no|auto) "auto" src CDATA #REQUIRED style CDATA #IMPLIED tabindex CDATA #IMPLIED>
]
>
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby freeTinker » Sun Jan 30, 2011 7:28 pm

Ok, I think I get it now! - if you could let me know if I am on the right path I would appreciate it

Strictly speaking, I should not be thinking in terms of validating to HTML5, but conforming to HTML5, so I write and validate to XHTML1.x (as suits), then when happy with my results, and by adopting HTML5 as my conformance standard, I then- simply change my doctypes for HTML5- it's about personal development for me, I hope that makes sense?!

It just seems there can be a lot of junkie-code that will validate to HTML5, on the other hand I get it- backwards-compatible! - maybe I have been putting too much emphasis on validation

Just thinking out loud!
freeTinker
<h5>
 
Posts: 14
Joined: Sun Jan 23, 2011 11:34 am
Location: USA-MA

Postby zcorpan » Sun Jan 30, 2011 8:17 pm

Validation is supposed to help you find mistakes (such as typos) and prevent you from doing stuff that are considered bad for various reasons. Playing tricks with custom DTDs to fool the validator kind of defeats the point of the standards wonks declaring something to be invalid because it's bad. Thankfully validator.nu can't be fooled that way.

Iframe is valid in HTML5 because it is useful and has clear use cases, and is not harmful to use (unlike framesets which have various problems).
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby JAB Creations » Sun Jan 30, 2011 9:41 pm

While many other elements both considered valid or invalid frames can be abused. Unfortunately frames and the iframe element were written off before the necessary means to work around related issues were not only implemented though gained an overwhelming establishment in the browser market share to make the newer alternative solutions a reliable and viable means to work with. So in other words iframes are in some rare cases still completely necessary as in example I can not work with (in even an ideal situation of) 18.04% of the browser market share with support for XMLHttpRequest 2 with support for AJAX file uploads. Every solution I've encountered uses JavaScript to use the non-standard innerHTML method to plop an iframe on to the page in example.

So the standards bodies removed the ability to validate the only viable means to implement certain features while the browser vendors (especially Microsoft) have not implemented the newer solutions we need quick enough to be able to rely on an overwhelming browser market share to consider the newer means a viable solution.

What ultimately matters is getting what clients need which means in this situation fixing the doctype to undo the premature deprecation of iframes is what ultimately matters. To remain relevant to current web standards I personally use XHTML 1.1 which I can extend support for (X)HTML 5 features as well as prematurely deprecated features of earlier versions of HTML as HTML5 makes it outright impossible to viably achieve the necessary solutions for clients while also attempting to validate with it's versionless doctype.

So in other words custom doctypes are the only viable means if you've already reviewed all of your options and you still wish to have your cake and eat it to or in this case have the required features without breaking validation. I have a thread here hoping someone will answer my last question about amending whatever existing element in the doctype which is the only remaining issue. It's an ugly solution though the situation wasn't pretty to begin with.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests