Re: [WSG] XML Declaration
Lachlan Hunt wrote: .html opens normally in any browser .xhtml Firefox will report well-formedness errors, page info dialog will typically show application/xhtml+xml. Just to make sure I've got it (somewhat) right at my end... I'm more or less aware of how easy it is to mess things up, so for the last 2 years I've used the following procedure: - Creating an xhtml 1.0 document. - Cleaning out 'human bugs' in HTMLTidy - 'convert to xml'. - Serving it as 'xhtml' with the extension '.xhtml' to browsers that can make anything out of it - Opera, Moz/FF, Safari - internally and on line. Info: application/xhtml+xml - no errors - no apparent problems. - Changing the extension down to '.html' to get wide-spread support, with no additional changes to the document. - Run it through any browser I care to support - and maybe a few others and the validator for good measure - no apparent problems. Is this enough 'real world' testing in order to secure quality of code so it can be served as either 'application/xhtml+xml' or 'text/html' by choice ? regards Georg -- http://www.gunlaug.no ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Gunlaug Sørtun wrote: I'm more or less aware of how easy it is to mess things up, so for the last 2 years I've used the following procedure: - Creating an xhtml 1.0 document. - Cleaning out 'human bugs' in HTMLTidy - 'convert to xml'. - Serving it as 'xhtml' with the extension '.xhtml' to browsers that can make anything out of it - Opera, Moz/FF, Safari - internally and on line. Info: application/xhtml+xml - no errors - no apparent problems. - Changing the extension down to '.html' to get wide-spread support, with no additional changes to the document. - Run it through any browser I care to support - and maybe a few others and the validator for good measure - no apparent problems. Is this enough 'real world' testing in order to secure quality of code so it can be served as either 'application/xhtml+xml' or 'text/html' by choice ? Yes, because you have developed and tested under both XHTML and HTML conditions, you already know your pages will survive the transition to true XML when the time comes. You would have already worked out any incompatibilities between the handling of scripts, stylesheets, encoding issues, etc. You are clearly not a beginner and you have made a very informed choice, and that is fine. Beginners, however, would not, nor can they be expected to be aware of all these issues and more often then not, develop XHTML in a purely HTML environment. It is this that will cause all the problems in the future, if they ever attempt to switch to true XML, and why I very strongly advocate that beginners start with HTML, not XHTML. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
- Creating an xhtml 1.0 document. - Cleaning out 'human bugs' in HTMLTidy - 'convert to xml'. - Serving it as 'xhtml' with the extension '.xhtml' to browsers that can make anything out of it - Opera, Moz/FF, Safari - internally and on line. Info: application/xhtml+xml - no errors - no apparent problems. - Changing the extension down to '.html' to get wide-spread support, with no additional changes to the document. - Run it through any browser I care to support - and maybe a few others and the validator for good measure - no apparent problems. Greetings everyone: line 2 above, how do you convert to xml? I have Tidy installed on mozilla/fx but i don't see anyway to convert. More explanation would be appreciated! i'm really appreciating these threads. i've been sticking with html4.01 until i understand what i'm doing, maybe that time is approaching? maybe... i ran into the information about how complicated all this was about 7 months ago, 3 months or so after i started learning css-p. so i don't have any new websites as xhtml. anyways, some elaboration by you Georg or anyone else obviously, on your methods would be appreciated. Thanks! Donna ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Donna Jones wrote: - Creating an xhtml 1.0 document. - Cleaning out 'human bugs' in HTMLTidy - 'convert to xml'. ... line 2 above, how do you convert to xml? I have Tidy installed on mozilla/fx but i don't see anyway to convert. More explanation would be appreciated! I use a rather old version of Tidy for my own work... HTML Tidy for Windows (vers 1st January 2002), see www.w3.org ...and set it like the following. Tidy Script editor - tidy-mark: false wrap: 120 quote-marks: true uppercase-tags: false fix-backslash: false literal-attributes: true numeric-entities: true output-xml: true - A short list with only the commands I'm interested in ATM. I'm a minimalist, and these commands does the job for me - for now. See the last line in that list - and the others too. Similar command-options can be found for Tidy in http://www.tswebeditor.tk/ (that I use when debugging other people's pages). Other editors, that has Tidy integrated, should give access to these command-options too, I guess. More about how I use editors and Tidy... http://www.gunlaug.no/contents/wd_1_07.html regards Georg -- http://www.gunlaug.no ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Lachlan Hunt said: Gunlaug Sørtun wrote: I'm more or less aware of how easy it is to mess things up, so for the last 2 years I've used the following procedure: - Creating an xhtml 1.0 document. - Cleaning out 'human bugs' in HTMLTidy - 'convert to xml'. - Serving it as 'xhtml' with the extension '.xhtml' to browsers that can make anything out of it - Opera, Moz/FF, Safari - internally and on line. Info: application/xhtml+xml - no errors - no apparent problems. - Changing the extension down to '.html' to get wide-spread support, with no additional changes to the document. - Run it through any browser I care to support - and maybe a few others and the validator for good measure - no apparent problems. Is this enough 'real world' testing in order to secure quality of code so it can be served as either 'application/xhtml+xml' or 'text/html' by choice ? Yes, because you have developed and tested under both XHTML and HTML conditions, you already know your pages will survive the transition to true XML when the time comes. You would have already worked out any incompatibilities between the handling of scripts, stylesheets, encoding issues, etc. You are clearly not a beginner and you have made a very informed choice, and that is fine. Beginners, however, would not, nor can they be expected to be aware of all these issues and more often then not, develop XHTML in a purely HTML environment. It is this that will cause all the problems in the future, if they ever attempt to switch to true XML, and why I very strongly advocate that beginners start with HTML, not XHTML. Well, it took some time, but I'm glad we've cleared that up. This is certainly more imformative for a beginner than simply telling them to use HTML. Perhaps this post can be bumped again with a more appropriate title: [SUMMARY] HOW TO USE XHTML IN 2005 complete with the shouting ;-) kind regards Terrence Wood. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration (was: Re: editor)
Gunlaug Sørtun wrote: An added advantage of including the 'xml declaration' is that IE7 won't be triggered by it. IE7 will simply skip it and treat 'xhtml 1.0' in 'Strict mode'. Therefore we have a built-in filter to avoid feeding IE6 styles to IE7, when our IE6 styles are using the old '* html' hack that IE7 will ignore when in 'Strict mode'. * html is supported by IE6 in any mode, there is no need to trigger quirks mode for it to be used. In fact, I have found no reason at all to ever intentionally trigger quirks mode in IE, and I'd be interested to know your reasons for doing so. All this back and forth is based on 'xhtml 1.0' served as 'text/html' and _treated as_ 'html 4' by every browser on earth. That's how I code and serve 'xhtml 1.0' today, with or without an 'xml declaration', and there are no actual problems involved when done right and assisted by 'HTMLTidy'. This is one of the myths I've been talking about in this thread. There are significant differences between text/html and application/xhtml+xml when it comes to handling scripts, stylesheets, erroneous markup and encoding information. XHTML *is not* merely HTML 4 in XML syntax, it comes packaged with all the XML handling requirements as well, with great big Fragile and Handle with Care stickers on the front of the box (metaphorically speaking). Well made and well prepared 'xhtml 1.0' with an 'xml declaration' is also ready for the next step - serving it as 'application/xhtml+xml'. That is assuming any scripts and stylesheets have been developed and tested with XHTML rules in mind. No advantage in that for the general web page/site at the moment, since no browser released (or to be released in the near future) by Microsoft will support 'xhtml 1.0' served as anything but 'text/html'. It is expected that IE8 will support XHTML, but the expected release schedule for it is (AFAIK) not publicly known, nor expected any time soon. My estimate is about 3 years away, with IE7 being about 6-12 months away. So, we have a choice whether to allow for the less demanding and not future-prepared 'html 4' to affect our coding-practices, or learn how to prepare for the future with well-formed 'xhtml 1.0'. Could you please explain what future needs to be prepared for with HTML 4? Are you expecting that browsers will drop support for it some time in the future, thus leaving any page not converted to XHTML inaccessible? Are you expecting browsers to start choking on invalid HTML 4? Are you expecting something else about HTML processing to significantly alter the way existing documents are treated and rendered? While I do believe XHTML will play a big part in the future, the future is not here yet and we have a long way to go before then. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Lachlan Hunt wrote: Gunlaug Sørtun wrote: An added advantage of including the 'xml declaration' is that IE7 won't be triggered by it. IE7 will simply skip it and treat 'xhtml 1.0' in 'Strict mode'. Therefore we have a built-in filter to avoid feeding IE6 styles to IE7, when our IE6 styles are using the old '* html' hack that IE7 will ignore when in 'Strict mode'. * html is supported by IE6 in any mode, there is no need to trigger quirks mode for it to be used. In fact, I have found no reason at all to ever intentionally trigger quirks mode in IE, and I'd be interested to know your reasons for doing so. I wrote that in the part you left out... - Depending on the task; it may often be easier to make IE6 appear to follow standards when we _do not_ allow that browser to use its 'Strict mode' (which I personally call the 'anything-but-standard mode'). - I could of course add examples, but they won't do anyone any good since they are based on personal preferences. I am not implying that we can't make 'Strict mode' work just as well in IE6, but why bother to work around problems in a dead and pretty predictable browser when it doesn't help it perform any better? IE6 is dead in development-terms, and its replacement won't suffer when we keep IE6 styles out of its reach. I don't even bother to use 'conditional comments' for serving corrective stylesheets to IE/win, since there is - and should not be - any need for those anyway. All this back and forth is based on 'xhtml 1.0' served as 'text/html' and _treated as_ 'html 4' by every browser on earth. That's how I code and serve 'xhtml 1.0' today, with or without an 'xml declaration', and there are no actual problems involved when done right and assisted by 'HTMLTidy'. This is one of the myths I've been talking about in this thread. There are significant differences between text/html and application/xhtml+xml when it comes to handling scripts, stylesheets, erroneous markup and encoding information. It is not a myth that 'xhtml 1.0' served as 'text/html' is treated as 'html'. How browsers are supposed to treat scripts and css when we serve proper 'xhtml' as 'application/xhtml+xml' is known to me, but it's a completely different matter since we're talking 'text/html' here - and will be for a long time to come. Well made and well prepared 'xhtml 1.0' with an 'xml declaration' is also ready for the next step - serving it as 'application/xhtml+xml'. That is assuming any scripts and stylesheets have been developed and tested with XHTML rules in mind. Of course. We have to play by the rules. No advantage in that for the general web page/site at the moment, since no browser released (or to be released in the near future) by Microsoft will support 'xhtml 1.0' served as anything but 'text/html'. It is expected that IE8 will support XHTML, but the expected release schedule for it is (AFAIK) not publicly known, nor expected any time soon. My estimate is about 3 years away, with IE7 being about 6-12 months away. Let us hope the final IE7 is at least up to the task when served 'text/html' and _standard_ CSS. I wonder what will happen to the different 'script-standards' (quirk/Strict) though. We may use the time from now until the arrival of a 'functional xhtml-support' in a future version of IE, to prepare our skills so we can serve 'proper xhtml' as 'proper xhtml' and expect it to be treated as such by the majority of browsers. Would be nice - even if it breaks a few times while trimming. So, we have a choice whether to allow for the less demanding and not future-prepared 'html 4' to affect our coding-practices, or learn how to prepare for the future with well-formed 'xhtml 1.0'. Could you please explain what future needs to be prepared for with HTML 4? Are you expecting that browsers will drop support for it some time in the future, thus leaving any page not converted to XHTML inaccessible? No. I didn't write 'not future-proof' - I wrote 'not future-prepared'. There is more than 'html' in that future, and 'html' can by definition *not* perform well outside its defined boundaries. So either 'html' has to be reformulated (which it already is through 'xml' into 'xhtml'), or some hybrids will have to add performance to 'html'. Are you expecting browsers to start choking on invalid HTML 4? No, browsers still swallow old 'non-standard html' every day, and won't drop support for 'garbage' until there's nothing left of that stuff on the web (which will probably never happen). So no problems with 'html 4' - apart from that browsers will still eat that and any other 'text/html' almost regardless of how bad it is created. Don't lead me into temptations might be a good reason for not promoting 'html 4' to anyone new to this game, although I'm extremely well aware of the fact that one can mess up 'xhtml' just as bad when serving it as 'text/html'. We will just have to counteract that in this transitional period, if we
Re: [WSG] XML Declaration
Could someone please spell the appropriate markup on the XHTML versus HTML issue? In other words, instead of the following: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=content-type content=text/html;charset=utf-8 / is it more proper to write the following? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=content-type content=application/xhtml+xml;charset=utf-8 / Put another way, is the value for 'content' the key for determing MIME type? The reason I am puzzled is that the latter example (which, *if* I have understood what has been written should not work in IE because it is XHTML) appears to be identical to the former example when viewed in IE. Based on what has been written, I figure I must be misunderstanding something. TIA. -- T. R. Valentine Use a decent browser: Safari, Firefox, Mozilla, Opera (Avoid IE like the plague it is) ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
On 12/3/05, T. R. Valentine [EMAIL PROTECTED] wrote: Put another way, is the value for 'content' the key for determing MIME type? The reason I am puzzled is that the latter example (which, *if* I have understood what has been written should not work in IE because it is XHTML) appears to be identical to the former example when viewed in IE. Based on what has been written, I figure I must be misunderstanding something. If your server is sending the MIME type text/html, then the META doesn't do anything. You need to change the MIME type being sent out in the headers, and that is done server side. -- -- Christian Montoya christianmontoya.com ... rdpdesign.com ... cssliquid.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
On 03/12/05, Christian Montoya [EMAIL PROTECTED] wrote: If your server is sending the MIME type text/html, then the META doesn't do anything. You need to change the MIME type being sent out in the headers, and that is done server side. Thanks for that explanation. But what about when simply opening the .html file in a browser, no server involved? Even there I do not see a difference in IE between the two forms. -- T. R. Valentine Use a decent browser: Safari, Firefox, Mozilla, Opera (Avoid IE like the plague it is) ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
2005/12/3, T. R. Valentine [EMAIL PROTECTED]: On 03/12/05, Christian Montoya [EMAIL PROTECTED] wrote: If your server is sending the MIME type text/html, then the META doesn't do anything. You need to change the MIME type being sent out in the headers, and that is done server side. Thanks for that explanation. But what about when simply opening the .html file in a browser, no server involved? Even there I do not see a difference in IE between the two forms. Why should you? application/xhtml+xml MIME type is not known to IE, so it uses text/html. You may want to check this: http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.asp Regards, Rimantas -- http://rimantas.com/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
T. R. Valentine wrote: On 03/12/05, Christian Montoya [EMAIL PROTECTED] wrote: If your server is sending the MIME type text/html, then the META doesn't do anything. You need to change the MIME type being sent out in the headers, and that is done server side. The only reason the meta element contains text/html, is so that it conforms with the syntax of an HTTP header. Since at least the Content-Type needs to be sent with the HTTP headers (or other higher level protocol), the MIME type specified in the meta element is essentially meaningless. Theoretically, the meta element is supposed to be able to be read by a server prior to sending the file to determine the HTTP headers to be sent, but I don't believe any servers in existence, or at least in use, actually do so. Browsers will try to determine the encoding from the meta element, if it's not specified in the HTTP headers, but the HTTP headers must always take precedence. Thanks for that explanation. But what about when simply opening the .html file in a browser, no server involved? Even there I do not see a difference in IE between the two forms. When opening from the local file system, browsers typically using the file extension to determine the MIME type. .html is generally associated with text/html, and that is the MIME type used. This is a summary of file extensions and their commonly associated MIME types: .xml application/xml (preferred) or text/xml (not recommended) .xht .xhtml application/xhtml+xml .htm .html text/html If you create some files with these extensions and open them up in Firefox. Then go to Tools Page Info, and notice where it says 'Type:' followed by the MIME type used. This info is also available in Opera and possibly other browsers too, I just can't remember where to find it. If you create an ill-formed XHTML document, save it as two separate files: one with .html and the other with .xhtml, and open the up in IE and Firefox. The results will be something like this: .html opens normally in any browser .xhtml Firefox will report well-formedness errors, page info dialog will typically show application/xhtml+xml. IE will either offer a save as dialog or cause it to open in your default browser (it opens it with Firefox for me, because that's my default browser, your system may be different) -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] XML Declaration
Sigurd Magnusson wrote: Is there any situation where IE6 renders in standard compliance mode with the ?xml ... preamble? Juergen Auer responded: If IE6 finds an Xml-Declaration, he switchs in BackCompat. If my understanding is correct, then this should be phrased somewhat differently. If IE6 sees *anything* before the DOCTYPE, then it switches to quirks mode. It does not look for the XML prolog specifically, and you'll get the same effect by placing a comment there or any other text. (Of course, anything other than the prolog would be invalid, but that's a separate matter.) -- Martin Lambert [EMAIL PROTECTED] ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Collin, Then why would W3C use it on their own site? This is the first 4 lines of their source code for their home page: ?xml version=1.0 encoding=utf-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-US lang=en-US head profile=http://www.w3.org/2000/08/w3c-synd/#;meta http-equiv=Content-Type content=text/html; charset=utf-8 / I'm not being argumentativejust curious. -- Carol Collin Davis wrote: Patrick: http://www.w3.org/TR/xhtml-media-types/ It clearly states that HTML 4 SHOULD be served as text/html, XHTML 1.0 (HTML compatible) MAY be served as text/html and XHTMl 1.0 (other) and XHTML Basic / 1.1 SHOULD NOT be served as text/html ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] XML Declaration
Carol, For one thing, as Patrick put it so well: [quote] I was suggesting that simply saying the W3C use it on their site is not an argument that holds too much weight. [/quote] Also, per the terminology defined by RFC 2119, none of the terms used for specifying MIME types are anything more than recommendations. It's really more of a best practices sort of question, as the XHTML Media types document states: [quote] Authors who wish to support both XHTML and HTML user agents MAY utilize content negotiation by serving HTML documents as 'text/html' and XHTML documents as 'application/xhtml+xml'. Also note that it is not necessary for XHTML documents served as 'application/xhtml+xml' to follow the HTML Compatibility Guidelines. [/quote] That's the entire point I was making in my first response, when I said I didn't understand why people send XHTML as text/html, when it's so very simple to use content negotiation to serve HTML 4.01 as text/html to UAs that can't handle XHTML sent as application/xhtml+xml (the proper way). I don't know if you read the article I linked to by Ian Hickson, but he brings across some very important points about serving XHTML as text/html. Basically, what it boils down to for me, is a lack of understanding as to why everybody who is jumping on the web standards bandwagon, with the desire as I understand it, to do things the right way - overlook or ignore the whole MIME type issue. I'll be the first to admit, when I first started with the web standards way of doing web pages, I served my XHTML pages as text/html, simply because I wasn't aware of the MIME type issue. Just seems odd to me (and even as far as the W3C site goes - but hey... how can you say what they're going to do next huh?) that the same people that tout web standards as the way to go, because it's the right way to do things, seem not to want to go all the way. (Also, I'll be the first to admit also that not all of the pages on all of the sites I maintain are using content negotiation - some are still XHTML being served as text/html). Always remember also - HTML 4.01 is still a valid standard - albeit not the newest one. Well, that's about the end of my little rant for now. Off for a four day weekend and to celebrate my birthday - take care :) Collin Davis Web Architect Stromberg Architectural Products 903.454.0904 e [EMAIL PROTECTED] w http://www.strombergarchitectural.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carol Doersom Sent: Friday, March 25, 2005 7:32 AM To: wsg@webstandardsgroup.org Subject: Re: [WSG] XML Declaration Collin, Then why would W3C use it on their own site? This is the first 4 lines of their source code for their home page: ?xml version=1.0 encoding=utf-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-US lang=en-US head profile=http://www.w3.org/2000/08/w3c-synd/#;meta http-equiv=Content-Type content=text/html; charset=utf-8 / I'm not being argumentativejust curious. -- Carol ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Hi, I currently use php content negotiation and found the following article very informative and the script digestable: (http://loadaveragezero.com/vnav/labs/PHP/DOCTYPE.php) C PS Collin, Happy Birthday On Friday, March 25, 2005, at 11:07 AM, Collin Davis wrote: Carol, For one thing, as Patrick put it so well: [quote] I was suggesting that simply saying the W3C use it on their site is not an argument that holds too much weight. [/quote] Also, per the terminology defined by RFC 2119, none of the terms used for specifying MIME types are anything more than recommendations. It's really more of a best practices sort of question, as the XHTML Media types document states: [quote] Authors who wish to support both XHTML and HTML user agents MAY utilize content negotiation by serving HTML documents as 'text/html' and XHTML documents as 'application/xhtml+xml'. Also note that it is not necessary for XHTML documents served as 'application/xhtml+xml' to follow the HTML Compatibility Guidelines. [/quote] That's the entire point I was making in my first response, when I said I didn't understand why people send XHTML as text/html, when it's so very simple to use content negotiation to serve HTML 4.01 as text/html to UAs that can't handle XHTML sent as application/xhtml+xml (the proper way). I don't know if you read the article I linked to by Ian Hickson, but he brings across some very important points about serving XHTML as text/html. Basically, what it boils down to for me, is a lack of understanding as to why everybody who is jumping on the web standards bandwagon, with the desire as I understand it, to do things the right way - overlook or ignore the whole MIME type issue. I'll be the first to admit, when I first started with the web standards way of doing web pages, I served my XHTML pages as text/html, simply because I wasn't aware of the MIME type issue. Just seems odd to me (and even as far as the W3C site goes - but hey... how can you say what they're going to do next huh?) that the same people that tout web standards as the way to go, because it's the right way to do things, seem not to want to go all the way. (Also, I'll be the first to admit also that not all of the pages on all of the sites I maintain are using content negotiation - some are still XHTML being served as text/html). Always remember also - HTML 4.01 is still a valid standard - albeit not the newest one. Well, that's about the end of my little rant for now. Off for a four day weekend and to celebrate my birthday - take care :) Collin Davis Web Architect Stromberg Architectural Products 903.454.0904 e [EMAIL PROTECTED] w http://www.strombergarchitectural.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carol Doersom Sent: Friday, March 25, 2005 7:32 AM To: wsg@webstandardsgroup.org Subject: Re: [WSG] XML Declaration Collin, Then why would W3C use it on their own site? This is the first 4 lines of their source code for their home page: ?xml version=1.0 encoding=utf-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-US lang=en-US head profile=http://www.w3.org/2000/08/w3c-synd/#;meta http-equiv=Content-Type content=text/html; charset=utf-8 / I'm not being argumentativejust curious. -- Carol ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** The true measure of ignorance is thinking intelligence is the solution to everything. -ck Chris Kennon Principal ckimedia (www.ckimedia.com) e-mail: ([EMAIL PROTECTED]) blog: (http://thebardwire.blogspot.com/) ph: (619)429-3258 fax: (619)429-3258 ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
[WSG] XML Declaration
Hi, I vaguely remember reading if the xml declaration position the following: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head titleVirtual Library/title /head body pMoved to a href=http://vlib.org/;vlib.org/a./p /body /html is switched (something like this): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en ?xml version=1.0 encoding=UTF-8? head titleVirtual Library/title /head body pMoved to a href=http://vlib.org/;vlib.org/a./p /body /html It does not throw IE into quirks mode. Is this true, necessary and what standard conformance changes regarding this issue are addressed in IE 7?: CK __ Knowing is not enough, you must apply; willing is not enough, you must do. ---Bruce Lee ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] XML Declaration
You are correct - when IE sees the XML prologue, it thinks that it's the doctype, and gets thrown into quirks mode. However, having the XML prologue after the doctype (as in your second example) isn't proper. Per the W3C specs, XHTML should be served as application/xhtml+xml or application/xml or text/xml and should not be served as text/html. Serving XHTML properly requires the XML prologue. However, unfortunately, most sites serve their XHTML markup as text/html. I've never really understood this - it's very easy to use content negotiation to serve up HTML 4.01 as text/html to browsers that can't handle the proper MIME type, and XHTML 1.0/1.1 as application/xhtml+xml to those that can. Regarding IE 7 - who knows except the developers? My two cents :) Collin Davis Web Architect Stromberg Architectural Products 903.454.0904 e [EMAIL PROTECTED] w http://www.strombergarchitectural.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Kennon Sent: Thursday, March 24, 2005 9:58 AM To: wsg@webstandardsgroup.org Subject: [WSG] XML Declaration Hi, I vaguely remember reading if the xml declaration position the following: ?xml version=1.0 encoding=UTF-8? is switched (something like this): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en ?xml version=1.0 encoding=UTF-8? head titleVirtual Library/title /head body pMoved to a href=http://vlib.org/;vlib.org/a./p /body /html It does not throw IE into quirks mode. Is this true, necessary and what standard conformance changes regarding this issue are addressed in IE 7?: CK __ Knowing is not enough, you must apply; willing is not enough, you must do. ---Bruce Lee ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Yes, I agree. XML Declaration must be (when used) the very first element in the document. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
Hi, I thought the article suggesting this was the specification, so I asked. I'll file it under 'Urban Myth. C On Thursday, March 24, 2005, at 08:08 AM, Patrick Lauke wrote: Chris Kennon !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en ?xml version=1.0 encoding=UTF-8? Sorry, but that's wrong. You either have the declaration as the very first thing, or you omit it completely...not shifting it down. Patrick Patrick H. Lauke Webmaster / University of Salford http://www.salford.ac.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** The true measure of ignorance is thinking intelligence is the solution to everything. -ck Chris Kennon Principal ckimedia (www.ckimedia.com) e-mail: ([EMAIL PROTECTED]) blog: (http://thebardwire.blogspot.com/) ph: (619)429-3258 fax: (619)429-3258 ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] XML Declaration
Collin Davis Per the W3C specs, XHTML should be served as application/xhtml+xml or application/xml or text/xml and should not be served as text/html. Actually, it doesn't say should not! As per section 5.1, it actually states that documents may be sent as text/html: XHTML Documents which follow the guidelines set forth in Appendix C, HTML Compatibility Guidelines may be labeled with the Internet Media Type text/html [RFC2854], as they are compatible with most HTML browsers. http://www.w3.org/TR/xhtml1/#media I've never really understood this - it's very easy to use content negotiation to serve up HTML 4.01 as text/html to browsers that can't handle the proper MIME type, and XHTML 1.0/1.1 as application/xhtml+xml to those that can. So your server actually sends clean HTML 4.01 to those browsers that can't handle XHTML? Does it strip out the self-closing slashes? Or are you sending XHTML with a text/html mime type (which you previously said should not be done)? Patrick Patrick H. Lauke Webmaster / University of Salford http://www.salford.ac.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] XML Declaration
On 25 Mar 2005 at 9:22, Sigurd Magnusson wrote: Is there any situation where IE6 renders in standard compliance mode with the ?xml ... preamble? If IE6 finds an Xml-Declaration, he switchs in BackCompat. I did use two testpages, look at http://www.sql-und-xml.de/ then at i-with.html or i-without.html At the end of both pages there is a small JavaScript which shows the mode, the only difference is the Xml-Declaration. Best Regards Juergen Auer ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **