doctype

how to get doctype tag with url using xsl:output

Hi, i have added the below xsl:output tag in xslt <xsl:output method="html" indent="yes" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" ></xsl:output> as a result i get the below doctype tag in the html output- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> how can i mention the url in the do...

What reasons could justify apple's HTML5 demos use of HTML4 doctypes?

Some of Apple's HTML 5 demos use an html4 loose doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; What reasons could they have for not using the HTML5 doctype?: <!DOCTYPE html> EDIT: I am really looking for technical answers here not political, perhaps I should of rew...

Strict doctype - form and input element

Does anyone know the reasoning behind the strict doctype not allowing input elements to be direct descendents of a form element. I find it annoying that i have to wrap a submit button which is a block level element inside another block level element say a fieldset or a div. However, I cannot find an answer anywhere as to why this actua...

Why does the HTML5 DOCTYPE mess with my padding?

I have an html5 page with a navbar. Completely scratch coded. I just recently added a doctype to the item, and now I’m getting extra space under my navbar. If I remove the doctype declaration, it goes back to normal. I have completely reset padding, margins, etc. on everything, and cut it down to the a small amount of code that illustrat...

Is there a way to force a page in IE8 to render in IE7 quirks mode or IE8 Compat View Quirks Mode?

NOTE: When I say "Browser Mode" and "Document Mode", I'm referring to the rendering options in the menu bar of IE8's developer tools. We're noticing odd functionality on our website in Internet Explorer 8. When the user clicks the "Add to Cart" button, the jQuery .load() method is called to request a new webpage that is then placed ins...

Forcing IE8 Standards Mode with FEATURE_BROWSER_EMULATION

I'm doing this: http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx But it's not working. I have "iexplore.exe" set to 8888 (decimal mode) under MACHINE, but it's still coming up documentMode = 5. I thought 8888 was suppose to force IE8 Standards Mode whether you have a doctype or not. What is goin...

Why does having a transitional doctype, cause my javascript to fail in WebKit and Opera Browsers

Hi all I am trying to get a mouseover script to work, when there is no doctype set the script works fine in all browsers I test, but the site looks like a dogs breakfast However When i set the doctype to transitional (it has to be this doctype) Firefox and IE8 (&compat mode) work fine But Opera and the webkit browsers can only displa...

jQuery check doctype

If doctype is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> // do something else // do something How to? Thanks. ...

What are practical pros to have Doctype DTD as a first element in our (X)HTML file?

What are benefits to have Doctype DTD as a first element in our (X)HTML file? What is their role in web development and browser (Desktop and Mobile both) compatibility? What are cons to not to use any Doctype? Are all browser does affected from Doctype? ...

Explanation of the Doctype Syntax

There are plenty of threads explaining what Doctype to choose, but I can't find any explaining the actual syntax. Take for example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> In particular: Can PUBLIC be replaced with other values and what does it mean? ...

PHP DOM: change doctype of existing DOMDocument

When creating a DOMDocument with DOMImplementation::createDocument(), you can specify a doctype as the third argument in the constructor. This doctype then gets "tied" to the document and you can retrieve it later with $document->doctype. However, this is a read-only attribute (unlike encoding and version!). Is there any way to change...

Why does this XHTML-MP code not pass W3C validation?

Wikipedia's example of XHTML-MP: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Hello</title> </head> <body> <p>Hello <a href="h...

InnerHTML/outerHTML in IE doesn't reflect checkbox state except in quirks mode

I am currently battling an IE JavaScript/DOM bug (what fun) and it has truly stumped me. The code in question copies some checkboxes into a form and needs to maintain their checked state. Problem is, IE (specifically IE8, though I'm guessing others as well) doesn't want to do that. I've narrowed down the bug itself to a very small tes...

how can i change the DOCTYPE

anyone here know how i can dynamically change the doctype with javascript? i have tried with this function, document.doctype('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'); , but it does not work. ...

Why do we need DOCTYPE to the HTML/JSP pages ?

I have very basic question. I don't know this question makes any sense or not. I don't know the reason why we need DOCTYPE to the HTML/JSP pages also. The pages will work Without DOCTYPE also. ...

is html5 doctype necessary for functioning of video tag?

just because the video tag is used does the whole page have to be HTML5?? i did not think so...what do you think? I have understanding that video tag ( <video> ) it is not strict HTML5 (partly because strict does not yet exist) nor is HTML5 used or needed to implement the video tag- that the tag can function in HTML4 /regular old HTML...

DOCTYPE stops my div from showing.

I have the following code which, as expected, shows a grey rectangle in both Firefox and IE. As soon as I add a DOCTYPE (HTML 4.01 Transitional) in front, it shows only a blank page. The online validator says the document is OK. What is wrong? Should I care about DOCTYPE? <html> <head> <title>Title</title> <meta http-equiv="content-...

Is this hardcoding? How can I avoid it?

I'm creating a parser for a specific XML structure and I'm facing a possible hardcoding issue. Here: private function filterDefaultParams($param){ #FIXME Hardcoding? return array_key_exists('default',$param); } The literal 'default' is a valid tag in the Xml structure, is this hardcoding? May I use another technique to search ...

Why does appendChild only work when I remove the docType

When I put any sort of doctype declaration like <!DOCTYPE html >, appendChild does not work.... Why? <form> <script language="javascript"> function function2() { var myElement = document.createElement('<div style="width:600; height:200;background-color:blue;">www.java2s.com</div>'); document.forms[0].appendChild(myEl...

Google Map not working with XHTML Doctype (Document Type)

Why on the earth there is always a chance that if we use "Doctype" with Google Maps, there will be a problem in showing the Google Map correctly? In a recent case, this "Doctype" just took my 2 days without any productivity. What a disgusting case? This time I got a help from one of my colleague (Subhankar Bannerjee), and many thanks...