Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-30-2003, 03:38 PM   PM User | #1
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
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:

Code:
<?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>
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?
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 01-30-2003, 03:51 PM   PM User | #2
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
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..
brothercake is offline   Reply With Quote
Old 01-30-2003, 04:16 PM   PM User | #3
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
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
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 01-30-2003, 04:23 PM   PM User | #4
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
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.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:18 PM.


Advertisement
Log in to turn off these ads.