SitePoint Sponsor

User Tag List

Page 3 of 4 FirstFirst 1234 LastLast
Results 51 to 75 of 88
  1. #51
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FF 2.0.0.1 shows
    Code:
    XML Parsing Error: syntax error
    Location: http://simon.html5.org/test/mobile/003.xht
    Line Number 1, Column 1:This document is malformed XML. If the UA shows a parse error then this test has PASSED. If there are no parse errors then this test has FAILED.
    ^
    IE7 shows:
    Anjanesh

  2. #52
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I guess if you didn't hack your registry then someone else must have...

    If you have this registry key [HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/xhtml+xml] then you can delete it (it doesn't exist by default), or change it's CLSID value to {48123BC4-99D9-11D1-A6B3-00C04FD91555} (which is the same as for application/xml).
    Simon Pieters

  3. #53
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE7 displays this XHTML page that is sent as application/xhtml+xml and the second one that you linked to, Simon.

    I thought that the DOCTYPE was required in XHTML documents?

    IE7 just shows the markup for mozillaquestquest.com.

    I don't have that particular Registry key on this computer.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  4. #54
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    That would not be an improvement at all! Doing that is horrible. It's like claiming to support PNG but instead interpreting image/png images as if they were GIF.
    Yeah! It would be like interpreting text/plain documents as if they were HTML. Wait a minute ... Microsoft are already doing that!

    Does IE7 render this page, which is definitely sent as application/xhtml+xml?
    Birnam wood is come to Dunsinane

  5. #55
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, with that page I get an error in IE7. It says that it couldn't open that Internet site. Maybe it's because that page uses the .php extension.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  6. #56
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Last edited by anjanesh; Jan 27, 2007 at 20:00.
    Anjanesh

  7. #57
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    IE7 displays this XHTML page that is sent as application/xhtml+xml and the second one that you linked to, Simon.

    I don't have that particular Registry key on this computer.
    Hmm... perhaps you have the MathPlayer plugin, or some other plugin, which makes IE accept application/xhtml+xml but treat it as text/html. Perhaps if you create that key it will override the plugin?
    Quote Originally Posted by Kravvitz View Post
    I thought that the DOCTYPE was required in XHTML documents?
    Not really. All it does is reference a DTD. All browsers that support XHTML use so-called non-validating XML parsers, that is they don't fetch the external subset. IE7, however, does fetch the external subset so it will have to download the DTD before it can start to parse the document. The DTD is not necessary to parse the document (which is why other browsers don't fetch it, and which is why XML has the concept of well-formedness in the first place) and thus fetching it is just a waste of bandwidth and time. It is therefore recommended nowadays to not include a doctype declaration in XML documents.
    Quote Originally Posted by Kravvitz View Post
    IE7 just shows the markup for mozillaquestquest.com.
    That's what it should do. XHTML is just generic XML to IE, since the namespace is not recognized.
    Simon Pieters

  8. #58
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    No, with that page I get an error in IE7. It says that it couldn't open that Internet site. Maybe it's because that page uses the .php extension.
    http://www.w3.org/2002/04/xml_bugs/#bug2

    (The page would render just fine and much faster if the doctype declaration wouldn't be present -- hint hint )
    Simon Pieters

  9. #59
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    Hmm... perhaps you have the MathPlayer plugin, or some other plugin, which makes IE accept application/xhtml+xml but treat it as text/html. Perhaps if you create that key it will override the plugin?
    I don't remember installing that plug-in and it doesn't seem to be in the list of installed IE plug-ins. Adding that key does make IE7 treat application/xhtml+xml like it handles text/xml, ie. it shows the XML source.

    Quote Originally Posted by zcorpan View Post
    Not really. All it does is reference a DTD. All browsers that support XHTML use so-called non-validating XML parsers, that is they don't fetch the external subset. IE7, however, does fetch the external subset so it will have to download the DTD before it can start to parse the document. The DTD is not necessary to parse the document (which is why other browsers don't fetch it, and which is why XML has the concept of well-formedness in the first place) and thus fetching it is just a waste of bandwidth and time. It is therefore recommended nowadays to not include a doctype declaration in XML documents.
    Hmmm.... But won't browsers render...? Do all browsers that actually support XHTML properly render pages served with an XML mime-type in Standards mode even when a doctype is not present?

    Quote Originally Posted by zcorpan View Post
    That's what it should do. XHTML is just generic XML to IE, since the namespace is not recognized.
    I know. I was just reporting what it was doing.

    Quote Originally Posted by zcorpan View Post
    http://www.w3.org/2002/04/xml_bugs/#bug2

    (The page would render just fine and much faster if the doctype declaration wouldn't be present -- hint hint )
    You seem to have lost me.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  10. #60
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    Hmmm.... But won't browsers render...? Do all browsers that actually support XHTML properly render pages served with an XML mime-type in Standards mode even when a doctype is not present?
    Yes. Browsers only do doctype sniffing for text/html; XML is always standards mode.
    Quote Originally Posted by Kravvitz View Post
    You seem to have lost me.
    It's a bug in IE's XML parser. The XHTML 1.1 DTD contains something equivalent to this:
    Code:
    <![IGNORE[ %foo; ]]>
    ...where %foo; is not defined anywhere, so IE aborts even though it should ignore the marked section.

    If the page didn't have the doctype declaration, IE wouldn't fetch the DTD, and thus this problem wouldn't occur.

    Although if you got some other error message then I don't know.
    Simon Pieters

  11. #61
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok.

    I got the error message that anjanesh posted a screenshot of.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  12. #62
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    I got the error message that anjanesh posted a screenshot of.
    Which one? The IE7 screenshots in #45 and #51 aren't error messages as far as I can tell.
    Simon Pieters

  13. #63
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was referring to #56. I see #45 and #51 as well when that registry key isn't in the registry.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  14. #64
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... http://img201.imageshack.us/img201/6...tmltesthp6.gif (the image in #56) doesn't load for me. What does it say?
    Simon Pieters

  15. #65
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    Hmm... http://img201.imageshack.us/img201/6...tmltesthp6.gif (the image in #56) doesn't load for me. What does it say?
    I reuploaded the image - smaller version
    Code:
    Internet Explorer cannot download blog.php from www.autisticuuckoo.net.
    
    Internet Explorer was not able to open the Internet site. The request site is either unavailable or cannot be found. Please try again later.
    Anjanesh

  16. #66
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok. That's not what I get...:
    The XML page cannot be displayed

    Cannot view XML input using style sheet. Please correct
    the error and then click the Refresh button, or try again
    later.
    ------------------------------------------------------

    Parameter entity must be defined before it is
    used. Error processing resource
    http://www.w3.org/TR/xhtml1...


    %xhtml-prefw-redecl.mod;
    -^
    Simon Pieters

  17. #67
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now, here is a blog that serves pure application/xhtml+xml : http://plasmasturm.org/ - found by jcheng.
    Anjanesh

  18. #68
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So does my blog, to browsers that claim to prefer it.
    Birnam wood is come to Dunsinane

  19. #69
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But your blog seems to show up in my IE like this:



    while plasmasturm.org prompts to download, saying unknown file-type.
    Anjanesh

  20. #70
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's right. I examine the Accept HTTP header that a user agent sends in hte GET request. Browsers that say they prefer application/xhtml+xml (e.g., Opera and Firefox) get an XHTML document served as such. Others (e.g., IE) get an HTML document served as text/html. Safari/Mac doesn't claim to prefer XHTML, so it gets HTML, but the Safari/Win beta says it prefers XHTML and gets that. Unfortunately it cannot handle it properly, but that's Apple's problem, not mine.

    You can override my content negotiation by appending a query parameter (xml=yes for XHTML or xml=no for HTML). Try adding ?xml=yes to the URL in IE and see what happens.
    Birnam wood is come to Dunsinane

  21. #71
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    But what about this for static pages?

    I don't use php / asp etc (just static xhtml pages) and therefore cannot code this logic into the MIME type served.

    However I want to take advantages of the xhtml benefits on the browsers that support application/xhtml+xml

    Can I not simply do the following:

    Does Microsoft Internet Explorer accept the media type application/xhtml+xml?
    No. However, there is a trick that allows you to serve XHTML1.0 documents to Internet Explorer as application/xml.

    Include at the top of your document the line in bold here:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="copy.xsl"?>
    <!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">
    <head>
    where copy.xsl is a file that contains the following:

    <stylesheet version="1.0"
    xmlns="http://www.w3.org/1999/XSL/Transform">
    <template match="/">
    <copy-of select="."/>
    </template>
    </stylesheet>
    Note that this file must be on the same site as the document referring to it.

    Although you are serving the document as XML, and it gets parsed as XML, the browser thinks it has received text/html, and so your XHTML 1.0 document must follow many of the guidelines for serving to legacy browsers.

    Your XHTML document will continue to work on browsers that accept XHTML 1.0 as application/xml.

    Source:
    http://www.w3.org/MarkUp/2004/xhtml-faq#advantages

  22. #72
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rsteven View Post
    However I want to take advantages of the xhtml benefits on the browsers that support application/xhtml+xml
    But there aren't any advantages in this case. Yes, you can use an identity XSLT transform for IE, but that means you cannot use any of the advantages (like other XML namespaces) in your XHTML markup, since it must be possible to transform straight into HTML.

    Using the identity transform you need to serve the document as application/xml rather than application/xhtml+xml, since IE doesn't support the latter.

    The main disadvantage of this approach is that it requires client-side XSLT. Not all browsers support that.

    Serving trivial XHTML as application/xhtml+xml to modern browsers is no advantage at all. Quite the opposite, really. The slightest well-formedness error will give Firefox users a YSOD, and even if it's well-formed they won't get incremental rendering (unless Firefox supports that now, but I don't think so). I believe Opera supports incremental rendering for XHTML, but I don't know about Safari.
    Birnam wood is come to Dunsinane

  23. #73
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the quick reply....

    Ok so as I am about to spent alot of time becoming proficient at coding strict standards compliant websites what do you recommend I learn?

    It seems that HTML 4 strict is the best option with the most browser compatibility, and simplest implimentation (i.e. no changing MIME types etc)

    However deep down I feel like I will be missing out on something cool if I leave off the x :-)

  24. #74
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...also I am planning to build alot of sites, perhaps a few hundred so if I go for XHTML but served as html would that be better in the long run? I could essentially change the way my pages are served to proper XML.

    This way would I have more chance that the websites would be more future proof?

    I would hate to have to transform them all in a few years to take advantage of some cool browser feature or xml feature....

  25. #75
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    The main disadvantage of this approach is that it requires client-side XSLT.
    Actually it doesn't; it requires support for either XSLT and HTML, or XHTML (supporting both will work fine, too).

    I would say that the main disadvantage is that it won't render incrementally in any browser (including IE). The XSLT file and the "source" XML file both have to load completely before the tranformation can be performed, IIRC.

    Or perhaps the main disadvantage is the complete poinlessness of doing it?
    Quote Originally Posted by AutisticCuckoo View Post
    [...] even if it's well-formed they won't get incremental rendering (unless Firefox supports that now, but I don't think so).
    Firefox 3 will support incremental rendering of XHTML (in the general case, at least).
    Simon Pieters


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •