Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Encoding And Xhtml Requirements
kvarnerexpress
post Dec 15 2005, 01:26 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



OK, so after reading a lot of contradicting information I decided to ask. How should document encoding be announced? The W3C validator (or at least links from the same upon a missing encoding) suggests the server should send the encoding in the content-type header. The problem with this that I see is that you can't always make a blanket judgment about what encoding pages will be in. Is it simply suggested to use .htaccess files (or equivalent) for this, then? I am led to believe that most (all?) browsers will ignore a content-type meta tag. Is there another in-file option? An attribute in an xml or html tag? But doesn't a client need to know what encoding a file is before it can parse it?

Secondly, and (in my mind at least) on a related note, what are the exact requirements for a page to be XHTML? I see a lot of talk about using <?xml ?> tags with various attributes, and using an xmlns attribute, and that the <?DOCTYPE > is simply there for validators. Well, even if the <!DOCTYPE > is soley for validators, the W3C validator doesn't complain about my lack of xmlns or anything, so are these actually required?

I'd appreciate any elaboration on these subjects.
Go to the top of the page
 
+Quote Post
Tyssen
post Dec 15 2005, 10:40 PM
Post #2



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(kvarnerexpress @ Dec 15 2005, 11:26 PM)
Secondly, and (in my mind at least) on a related note, what are the exact requirements for a page to be XHTML? I see a lot of talk about using <?xml ?> tags with various attributes, and using an xmlns attribute, and that the <?DOCTYPE > is simply there for validators. Well, even if the <!DOCTYPE > is soley for validators, the W3C validator doesn't complain about my lack of xmlns or anything, so are these actually required?

XHTML 1.1 must be served with the XML prologue (<?xml version="1.0" encoding="UTF-8" ?>). With this prolog, pages must be served with the application/xml+xhtml MIME type (that's the meta http-equiv="Content-Type"...). Unfortunately, IE (and that's going to include IE7 too) doesn't support serving pages with this MIME type. For IE, you have to use text/html.
So for that reason, it's advisable to serve your pages as XHTML 1.0 which doesn't require the XML prologue. Either that or use a browser sniffing script to serve up different MIME/DOCTYPES.
Go to the top of the page
 
+Quote Post
Saint_Michael
post Dec 15 2005, 11:49 PM
Post #3


$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3
*********************

Group: [HOSTED]
Posts: 6,563
Joined: 21-September 04
From: 9r33|\| 399$ 4|\|D 5P4/\/\
Member No.: 1,218
T17 GFX Crew



I know that in order to use <xml> docs you need xhtml to start it up, xml is move server side database stuff then something like css, closely they resemble but both require different attributes and different code to work properly.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Html And Xhtml(11)
  2. What Is The Xhtml 1.1 Code To Embed An Applet?(2)
  3. Order With Xhtml And Css(10)
  4. Xhtml Dtd(5)
  5. Xhtml Forms Layout(8)
  6. Xhtml 1.1 Vs Xhtml 1.0(13)
  7. Strict Xhtml(4)
  8. What Is Xhtml(27)
  9. Modify The Invision Skin Standards(1)
  10. Xhtml Strict Method For Submit/reset Buttons As An(1)
  11. Embed Tag Valid In Xhtml 1.0 Strict?(2)
  12. Need Free Help With Upgrading Websites For Church(4)
  13. Wml / Xhtml ?(6)
  14. Create A Xhtml, Css3 Valid Gallery With Javascript ;part 1(0)
  15. Questions About Xml, Xhtml(3)
  1. Xhtml Strict Links Tip(5)
  2. Opening Hyperlink In New Window Using Xhtml 1.0 Strict(5)


 



- Lo-Fi Version Time is now: 6th October 2008 - 10:41 PM