XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old December 27th, 2001, 06:14 AM
Michael_Bray Michael_Bray is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Sydney, NSW, Australia
Posts: 40 Michael_Bray User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to Michael_Bray
Xhtml - <html xmlns=...> question.

Hi,

I am updating my HTML to the xhtml 1.0 specification to make any updates later involving XML easier. At the moment my <html> tag looks like:

<html xml:lang="en" lang="en">

But I see that some people add the following:

<html xmlns="http://www.w3.org/1999/xhtml">

Is it needed, and what does it do? I want to keep everything to specification and know what everything in the file does. Thanks for your help!
__________________
Cheers,
Michael Bray

Reply With Quote
  #2  
Old December 29th, 2001, 10:59 AM
jkd jkd is offline
CF sMod
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Maine, USA (a.k.a. Boonies)
Posts: 242 jkd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 43 sec
Reputation Power: 9
Send a message via ICQ to jkd Send a message via AIM to jkd Send a message via Yahoo to jkd
It declares the main namespace. If you were to save your document as .xml instead of .html, and expected it to render as XHTML, you would need the xmlns="bla" declaration inside the root element.
__________________
Jason Contact Me
Super moderator @ CodingForums

Reply With Quote
  #3  
Old December 30th, 2001, 04:52 PM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 8
Slight clarification of what jkd explained: regardless of what extension you save the file with, to be an XHTML conforming document the xmlns attribute must be "present" with that value. Actually, the attribute is declared with a fixed value in the DTD, so if you don't specify it in your document it will still be valid. If you do specify it, it must have that value. See XHTML 1.0: The Extensible HyperText Markup Language: 3.1.1 Strictly Conforming Documents.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Xhtml - <html xmlns=...> question.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway