Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Thanked 49 Times in 49 Posts

    xml,ie and mozilla

    I'm confused. I've seen sits that use xml and I've been able to see them in IE5. I thought I'd have a bash at xml, so I did this:

    <?xml version="1.0"?>
    <!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">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <meta name="author" content="Nightfire" />
      <meta name="description" content="Site on motorcycles" />
      <meta name="keywords" content="motocycles" />
    <p>Welcome to me new site!</p>
    <hr />
    <p><small>Created on ... January 29, 2003</small></p>
    Works fine in Mozilla, shows how I want it, but when I try to see it in IE5, it just shows the source with (+)(-) in various places.

    So how do I get it to show in IE5 as a proper page?

  2. AdSlot6
  3. #2
    Senior Coder
    Join Date
    Jun 2002
    near Oswestry
    Thanked 0 Times in 0 Posts
    What you've posted there is XHTML - XHTML is XML, but not in the sense you're thinking of - it already has a predefined DTD, and browsers laready know how to parse it into visual output. You're seeing the node tree because you;ve used the ".xml" extension for the file.

    If you change the file extension to .html, you'll be able to see the page. But I'm guessing that's not what you want - I think what you want is XML which you can transform into XHTML ... for which you also need an XSL stylesheet.

    w3schools have excellent tutorials on getting started with XML/DTD/XSL
    Last edited by brothercake; 01-30-2003 at 03:54 PM.

  4. #3
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Thanked 49 Times in 49 Posts
    tbh I wasn't sure what it was that I did up there. It was done by using notetab and I saw xml at the top of the page so assumed it was xml

    Gonna read up at the tutorial site now to see if it can unconfuse me

  5. #4
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    metro DC
    Thanked 18 Times in 18 Posts
    What you are seeing is IE being stupid. IE does not recognize the XHTML namespace - rather it invokes its HTML rendered when it is presented something with it knows to be HTML - either a known extension (.html, .htm), or something served as text/html.

    The proper behavior is to invoke the XHTML rendering, like Mozilla does.

    As a matter of fact, serving XHTML 1.1 as text/html (tagsoup) is invalid, and highly discouraged with XHTML 1.0. But of course, IE makes this impossible without content negotiation for good browsers, and for IE.


Posting Permissions

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