View Full Version : xml sitemaps: are there any DTD requirements on the actual HTML web pages?
code beginner
03-31-2010, 02:14 AM
Hello,
I've been using this DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Do you have to use the strict version if you want to use an xml sitemap?:
<!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">
MattF
03-31-2010, 02:18 AM
A sitemap merely lists the URI on which the pages can be found. The content, from the sitemap perspective, doesn't matter a monkeys, as they're totally unrelated in that regard.
code beginner
03-31-2010, 02:49 AM
Thanks, Matt. I thought so, but I'm new at XML and sitemaps so I wasn't sure.
The more I read about XML, the more fun it looks!
drhowarddrfine
03-31-2010, 03:59 AM
Not sure the question was answered but doctypes are not used for xml sitemaps at all.
MattF
03-31-2010, 04:13 AM
Not sure the question was answered but doctypes are not used for xml sitemaps at all.
He? was just wondering if the pages listed in the sitemap had to be XHTML strict doctypes.
Arbitrator
03-31-2010, 07:17 AM
He? was just wondering if the pages listed in the sitemap had to be XHTML strict doctypes.DTDs specify what elements and attributes are allowed to appear in a document and how they should be nested and ordered. Since the XHTML DTDs only specify XHTML elements, you cannot have a valid document while using Sitemap elements unless you specifically extend the DTD to include the Sitemap elements and attributes. (I'm not even sure if you can do that; I can't remember if you can use internal DTD subsets to override an external DTD declarations.)
The easiest thing to do would be to omit the DTD altogether; they're not required in XML like they are in HTML.
MattF
03-31-2010, 07:34 AM
The O.P already has a valid sitemap and valid XHTML transitional webpages. It was the interaction between the two he was enquiring about.
For example, the sitemap lists five document URI's. What the O.P was unsure of was whether those five documents referenced by the URI's in the sitemap had to be strict doctypes rather than merely transitional.
Arbitrator
03-31-2010, 08:15 AM
The O.P already has a valid sitemap and valid XHTML transitional webpages. It was the interaction between the two he was enquiring about.
For example, the sitemap lists five document URI's. What the O.P was unsure of was whether those five documents referenced by the URI's in the sitemap had to be strict doctypes rather than merely transitional.Ah, I see. My bad. I was only looking at the post content and missed the post title.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.