Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: xml,ie and mozilla
01-30-2003, 03:38 PM #1
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"> <head> <title>BikingMania</title> <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" /> </head> <body> <h1>BikingMania</h1> <p>Welcome to me new site!</p> <hr /> <p><small>Created on ... January 29, 2003</small></p> </body> </html>
So how do I get it to show in IE5 as a proper page?
01-30-2003, 03:51 PM #2
- 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.
01-30-2003, 04:16 PM #3
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
01-30-2003, 04:23 PM #4
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.