WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > HTML & XHTML > XHTML Black Book

Reply
  Thread Tools Display Modes
Old 29th September 08, 02:26 AM   #1
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default XHTML Black Book

I'm reading XHTML Black Book and there saying that using DTD files in a directory is better...

So should I use DTD files in a directory? (I never seen a website do that)...?

It looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">



TY for reading.
alie4u2 is offline   Reply With Quote
Old 29th September 08, 06:43 AM   #2
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: XHTML Black Book

that is NOT a valid DTD anyway. It is only a partial DTD and is as much use as not having one at all.

Not sure what a directory has to do with though, maybe you need to re-read it and explain exactly what they mean.
chrishirst is offline   Reply With Quote
Old 30th September 08, 02:31 AM   #3
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default Re: XHTML Black Book

Here's the exact text of the paragraphs from the book:


Here's one thing to note: I'm giving the full URL of the various DTD files in these <!DOCTYPE> elements, which means that the browser has to fetch the full DTD file from the W3C before it can check your coument. If everyone did that, W3C would be swamped as millions of browsers tried to read the same files. To prevent that, you can copy the DTD files from those URLs and place local copies on your Web Site. For example, if you place the DTD files in a directory named DTD in your Web site, your <!DOCTYPE> elements might look more like this:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"DTD/xhtml1-frameset.dtd">
alie4u2 is offline   Reply With Quote
Old 30th September 08, 09:39 AM   #4
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: XHTML Black Book

Okay I see what it is getting at.
It is completely WRONG BTW, browsers DO NOT look at the W3c site for the actual document each time a page is viewed or validated.
They have the standard specification built in to the browser and have no need to "look it up"

IF you wanted to have a custom DTD, ie: you have rewritten a ECMA (javascript) method definition and your site relies on this, THEN you should have the URL pointing to the modified document on your site so browsers can pick it up and use the newly defined behaviour.
BUT, and this another point where your "Black Book" is incorrect. The URLs defined there would ONLY work IF and WHEN the document was on the same level or above the DTD folder. IF your document was in a subfolder of your site it would not be able to locate the definition document.
chrishirst is offline   Reply With Quote
Old 30th September 08, 07:37 PM   #5
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default Re: XHTML Black Book

hmmm I see; TY for pointing that out. Is there a benefit/advantage if you have a custom DTD or put a DTD in your directory?
alie4u2 is offline   Reply With Quote
Old 3rd October 08, 01:33 AM   #6
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default Re: XHTML Black Book

bump
-Bumping Up My P0st
alie4u2 is offline   Reply With Quote
Old 3rd October 08, 06:54 AM   #7
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: XHTML Black Book

Nope. ..
chrishirst is offline   Reply With Quote
Old 3rd October 08, 07:46 PM   #8
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default Re: XHTML Black Book

K TY; you helped allot...
alie4u2 is offline   Reply With Quote
Old 6th October 08, 04:30 AM   #9
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default Re: XHTML Black Book

The book later says:

You can even omit the <!DOCTYPE> element, but then your XHTML is not strictly-confronting XHTML. My guess for the longer term is that true XHTML browsers
will have the XHTML DTDs built-in, and will be able to validate documents against them without having to fetch those DTDs at all.


-So is this what you mean by browsers having DTDs build in; because this book was made in 2001-2002.
alie4u2 is offline   Reply With Quote
Old 7th October 08, 03:38 AM   #10
alie4u2
WLC Member
 
Join Date: Sep 2008
Posts: 10
Default Re: XHTML Black Book

bump
-Bumping Up My P0st
alie4u2 is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

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. The time now is 09:03 AM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright© 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.