Click here to get back home

DTDs, www & validation

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DTDs, www & validation Michael Rozdoba 12-10-2004
Get Chitika Premium
Posted by Michael Rozdoba on December 10, 2004, 10:27 pm
Please log in for more thread options
I've been wandering around the results of numerous googles for several
hours without reaching a conclusive solution, so I'm dipping a tentative
toe back in ciwah...

I've been persuaded here in the past that serving xhtml is a bad thing (tm).

I want the extra constraints xhtml imposes.

It has been suggested before to create a DTD which requires these &
includes all the requirements of HTML 4.01 & validate against that.

I've downloaded such a document from
http://www.spartanicus.utvinternet.ie/html401-stricter.dtd which I'm
sure looks familiar to all the regulars here.

My questions are pretty simple to state:

How do I make use of this to achieve the above?

I know I can declare <!DOCTYPE HTML SYSTEM
"http://www.spartanicus.utvinternet.ie/html401-stricter.dtd">
(though I'd first either enquire as to whether I should use this url or
duplicate the file on my own server).

However I'm concerned as to whether some browsers will do something
undesirable in their interpretation of my pages when they see this,
rather than a standard public declaration.

Also, http://www.spartanicus.utvinternet.ie/no-xhtml.htm which links to
the above DTD, declares itself as HTML 4.01.

This leads me to wonder, am I supposed to use the !DOCTYPE HTML SYSTEM
form only for development validation & then replace this with a !DOCTYPE
HTML PUBLIC referring to HTML 4.01 prior to the site going live?

However, if that is what one should do, why not just declare an XHTML
1.0 doctype while developing & then replace this with the html 4.01 type
prior to going live to achieve an equivalent effect?

Is there an ideal solution?

Along the way, which resources do the readers here use for validation?
Software installed locally & if so, what, or the online services of w3c
or wdg?

Lastly, for a current project I'm forced to use DreamweaverMX2004; can
it be persuaded to validate against a custom dtd?

Perhaps there's a different & better solution to this whole problem.

--
Michael
m r o z a t u k g a t e w a y d o t n e t


Posted by Darin McGrew on December 10, 2004, 10:55 pm
Please log in for more thread options
> I've downloaded such a document from
> http://www.spartanicus.utvinternet.ie/html401-stricter.dtd which I'm
> sure looks familiar to all the regulars here.
>
> My questions are pretty simple to state:
>
> How do I make use of this to achieve the above?

I merely configured my local validator to use my custom DTD rather than the
W3C's DTD when it sees the W3C's standard DOCTYPE declaration. My custom
DTD is more restrictive than the W3C's DTD, so if a document validates
against my DTD, then it will validate against the W3C's DTD as advertised.

Technically, if your custom DTD allows markup that the W3C's DTD doesn't
allow (e.g., http://www.cs.tut.fi/~jkorpela/html/strict.dtd), then you're
guilty of false advertizing if you use one of the W3C's standard DOCTYPE
declarations. But I think that's the lesser evil in these days of browsers
with DOCTYPE sniffing.

FWIW, I don't bother using the DTD to enforce XML-like requirements that
all attributes be quoted, that optional closing tags be used, etc. For
that, I use a tool that adds quotes, closing tags, etc.:
http://www.jclark.com/sp/spam.htm

> Along the way, which resources do the readers here use for validation?

I've got a copy of nsgmls installed locally:
http://www.jclark.com/sp/nsgmls.htm

I use makefiles to run an HTML preprocessor and other programs to
automatically generate and validate HTML documents from preprocessor
source, data files, etc.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Cheaters never win; they just finish first." - Johhny Hart


Posted by Michael Rozdoba on December 10, 2004, 11:28 pm
Please log in for more thread options
Darin McGrew wrote:

> I merely configured my local validator to use my custom DTD rather
> than the W3C's DTD when it sees the W3C's standard DOCTYPE
> declaration.

That was why I asked a later question about where posters validate -
local looks like a better solution as one has more control. This seems
much more practical.

> My custom DTD is more restrictive than the W3C's DTD, so if a
> document validates against my DTD, then it will validate against the
> W3C's DTD as advertised.

Indeed.

> Technically, if your custom DTD allows markup that the W3C's DTD
> doesn't allow (e.g., http://www.cs.tut.fi/~jkorpela/html/strict.dtd),
> then you're guilty of false advertizing if you use one of the W3C's
> standard DOCTYPE declarations.

Quite - not something I'd do intentionally; anyhow, I'm sure I'm
incompetent enough to make up for that with other errors.

> But I think that's the lesser evil in these days of browsers with
> DOCTYPE sniffing.
>
> FWIW, I don't bother using the DTD to enforce XML-like requirements
> that all attributes be quoted, that optional closing tags be used,
> etc. For that, I use a tool that adds quotes, closing tags, etc.:
> http://www.jclark.com/sp/spam.htm

Interesting. Thanks, I'll look into that, though I think I'd rather be
in the habit of writing them myself. As long as I am writing code by
hand I'd rather write it the way I mean it to end up, iyswim.

>> Along the way, which resources do the readers here use for
>> validation?
>
>
> I've got a copy of nsgmls installed locally:
> http://www.jclark.com/sp/nsgmls.htm

That I definitely will pay a visit to shortly.

> I use makefiles to run an HTML preprocessor and other programs to
> automatically generate and validate HTML documents from preprocessor
> source, data files, etc.

Sounds like fun. I think I'll not get into that for the time being - got
enough on my plate atm. Cheers.

--
Michael
m r o z a t u k g a t e w a y d o t n e t


Posted by Eric B. Bednarz on December 11, 2004, 12:04 am
Please log in for more thread options

> I want the extra constraints xhtml imposes.

Uh, all of them?

<http://groups-beta.google.com/group/alt.html/msg/bab970becd5a41d3>

might answer some of your questions, also some you forgot (groups-beta
is bloody annoying, BTW).

> This leads me to wonder, am I supposed to use the !DOCTYPE HTML SYSTEM
> form only for development validation & then replace this with a
> !DOCTYPE HTML PUBLIC referring to HTML 4.01 prior to the site going
> live?

No; you can just use the public identifier for HTML 4.01, and override
that locally. If you haven't, you should look into (X)Emacs which
allows for using your private DTD for the editing part, not just after
the fact control.

> Lastly, for a current project I'm forced to use DreamweaverMX2004; can
> it be persuaded to validate against a custom dtd?

Since when does Dreamweaver ship with a validating system?


--
| ) Più Cabernet,
-( meno Internet.
| ) http://bednarz.nl/


Posted by Michael Rozdoba on December 10, 2004, 11:48 pm
Please log in for more thread options
Eric B. Bednarz wrote:
>
>
>>I want the extra constraints xhtml imposes.
>
>
> Uh, all of them?

Erm, probably not - bad choice of wording. The only ones I had in mind
were closing of elements & quoting of attributes. Though I have no
immediate objections to any constraints which force greater separation
of content & presentation. Does xhtml impose additional constraints
outside of those?
>
> <http://groups-beta.google.com/group/alt.html/msg/bab970becd5a41d3>
>
> might answer some of your questions, also some you forgot

Thanks :)

> (groups-beta
> is bloody annoying, BTW).

I've not made my mind up - without getting too OT, what's annoying you
the most?

>>This leads me to wonder, am I supposed to use the !DOCTYPE HTML SYSTEM
>>form only for development validation & then replace this with a
>>!DOCTYPE HTML PUBLIC referring to HTML 4.01 prior to the site going
>>live?
>
>
> No; you can just use the public identifier for HTML 4.01, and override
> that locally.

Which again implies local validation. I'll try to sort that out now.

> If you haven't, you should look into (X)Emacs which
> allows for using your private DTD for the editing part, not just after
> the fact control.

I wonder if I can do that with vim? I'm using vim not as I know it yet
but because I like it & am trying to force myself to learn to use it ;)
I needed a good editor which doesn't require a gui; forget why I plumped
for vi et al rather than emacs.

That all said, I'm required to use DW & also need to use it in order to
learn how to use it - as part of a course module - for my current
project, so the more closely I can integrate a validation solution with
DW the better.

I've already had to edit a couple of its config files manually to get it
to stop choosing transitional dtds which afaic is wasting my time - not
as friendly as I was told it is. That said, the code it produces doesn't
look too bad & it seems to let me stay in control most of the time.

>>Lastly, for a current project I'm forced to use DreamweaverMX2004; can
>>it be persuaded to validate against a custom dtd?
>
>
> Since when does Dreamweaver ship with a validating system?

I can't claim for certain it does, however it does allow one to validate
documents one way or another. Also, I've read some third party
documentation which implies it has it's own validation code.

If I wasn't in the middle of several downloads I'd kill my net
connection & try validating a few files. Will do that later.

This is in respect of DW MX2004 v7.0 btw.

--
Michael
m r o z a t u k g a t e w a y d o t n e t


Similar ThreadsPosted
Indirection in the DTDs October 5, 2004, 3:02 pm
DTDs: W3C v. O'Reilly et al. December 26, 2004, 8:22 pm
Assembling composite DTDs June 2, 2006, 6:28 am
xhtml, custom dtds, and MIME types January 27, 2006, 2:34 pm
help with validation July 30, 2004, 5:22 pm
validation September 2, 2004, 8:15 am
validation November 28, 2004, 3:12 am
HTML validation November 4, 2004, 12:41 am
POST validation October 6, 2005, 2:45 pm
form validation November 28, 2004, 1:14 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap