Welcome to WebmasterWorld Guest from 54.159.50.111

Forum Moderators: httpwebwitch

Message Too Old, No Replies

XHTML Schema in place of XHTML Doctype?

     
1:57 am on Jan 21, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
posts:3145
votes: 12


My understanding is I have an option (as far as the W3C is concerned) between using a DTD Doctype and an XHTML Schema to declare the language I am using (in my case XHTML 1.1). Regardless of browser issues what lines of code would I use to declare my document conforms to XHTML 1.1 using the XML schema method?

- John

8:10 pm on Jan 22, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 17, 2001
posts:1262
votes: 0


Read through the first section of [w3.org...] . Since the DTD DOCTYPE is required to trigger standards mode in IE, the dual method (1.5) may be preferred.
9:05 pm on Jan 22, 2007 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9063
votes: 2


You would have to serve the document as
application/xhtml+xml
or
application/xml
anyway, which makes IE compatibility not really an issue - and as such you wouldn't need the doctype at all when serving as XML...
9:46 pm on Jan 22, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 19, 2005
posts:63
votes: 0


The advantage that XML schemas have over DTD in the XML world is that they give finer control of validation of your fields.

For XHTML, the browsers won't be particularly concerned either way.

10:05 pm on Feb 1, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
posts: 3145
votes: 12


I'm just not finding the XHTML 1.1 schema declaration code anywhere online, could someone please post it for me?

- John