• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

W3C validation defaulting to insanely wrong doctype in spite of declaration

Explorer ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

I've been using Dreamweaver since it was a pup, but put off joining the cloud until recently.  I am a dinosaur. I generally use 4.0 transitional for the few static sites I'm still maintaining, and am primarily working with XHTML in ebook production.  I'm sure what I don't know would fill one of those books. I have googled my fingers off over this situation to no avail.

My doctype declaration is a copy-paste right from W3C: 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

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

 

My files validate when I use the W3C browser validation tool.  But when I use the Dreamweaver (v.20.1) W3C validation, I get this error message:

Using the preset for XHTML + SVG 1.1 + MathML 3.0 + RDFa 1.1 based on the root namespace. [none]

And it's all downhill from there.

Obviously I can continue to validate through W3C, but it would be nice to sort this out so I can use program validation.  I've tried so many things I can't even list them--and this is happening to files that used to validate quite nicely in my previous non-cloud version on my beloved Win7.  Like I said, a dinosaur.

Views

3.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 28, 2020 Apr 28, 2020

Dreamweaver's default validation tool is pulling results results from http://validator.w3.org/nu.

The /nu is likely the issue for you, that is the W3C's HTML 5 validation tool. Unless you change your entire doctype declaration to <!doctype html> it's going to tell you the declaration is wrong and throw a mountain of errors at you if the rules for your current doctype are any different from HTML5.

You might be able to fix it by choosing a different validation parser under  Edit > Preferences > W3C

...

Votes

Translate

Translate
LEGEND ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

Don't blame Dw for this.

 

A few years ago, the W3C anounced that any new (or updated) sites should use (or convert to) the html5 doc type. At the same time they anounced that the old html4/xhtml doctypes are to be considered obsolete, (the debate on that is still ongoing). So as Dw is a tool for web development, (not ebooks) they dropped the older validation routines.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

I can't find that statement from W3C, and they say to use correct  <Doctype> for HTML 4 in my case; as I use frames, it will be 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd"> and/or
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
        "http://www.w3.org/TR/html4/frameset.dtd">

so I can't use the Validation in Dreamweaver version 21.3 because of the  Doctype bug for html4tr 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

I used this Validator The W3C Markup Validation Service

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

Hello,

 

only to show you how my different (German) DWs start with new php-file, I'll send you the entries:

 

DW CC 2015:

 

DW CC 2018:

 

DW CC 2019:

 

DW CC 2020:

 

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Unbenanntes Dokument</title>

</head>

 

<body>

</body>

</html>

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Unbenanntes Dokument</title>

</head>

 

<body>

</body>

</html>

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Unbenanntes Dokument</title>

</head>

 

<body>

</body>

</html>

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Unbenanntes Dokument</title>

</head>

 

<body>

</body>

</html>

 

In my eyes it's always the same and I can say, it sems to have gotten me this far. ;-)))

 

Hans-Günter

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

Dreamweaver's default validation tool is pulling results results from http://validator.w3.org/nu.

The /nu is likely the issue for you, that is the W3C's HTML 5 validation tool. Unless you change your entire doctype declaration to <!doctype html> it's going to tell you the declaration is wrong and throw a mountain of errors at you if the rules for your current doctype are any different from HTML5.

You might be able to fix it by choosing a different validation parser under  Edit > Preferences > W3C Validator 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

Thank you!  That's a reason I never considered, since I can validate directly through W3C online.  (That issue sure doesn't come up in desperate searches.)

I had tried changing the preferences without success, unfortunately.  Probably because XHTML isn't a choice in the menu.

So, this is likely an ignorant question but I'm pretty literal.  You mentioned changing my doctype declaration to indicate an HTML5 document.  Obviously I know crap-all about HTML5.  Is it inclusive of XHTML rules, so my clean XHTML1.1 documents wouldn't just throw a whole new set of errors?  Because if so I can happily build the files as HTML5 and change the doctype before conversion to epub.  My quick research indicates yes--or that perhaps I can simply switch to HTML5 as my base document--but if someone knows that offhand, it would be reassuring, and I can confidently invest the time in learning more.

(I know it's weird, but working HTML in Dreamweaver is really the cleanest way to build the underlying file for the epub--unless you count Homesite, which is even better for tidying, but which I may have lost in the switch to Win10.  Going directly from the manuscript file through the various programs meant to build epub is just...nasty.  Not that everyone doesn't do it, but they all used to happily use Frontpage, too.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

You can test it out on a new clean page, Hans posted the page minimum above.

HTML 5 actually removed a lot of superfluous junk from the spec, you no longer need to tell the browser that your <script> tag is type"text/javascript" for example. Most of the errors you'd end up seeing would be "obsolete, use css instead". The structure really hasn't changed all that much, aside from adding semantic tags like <header> instead of using <div id="header">, but they don't need to be used either. You can check out the basics, and fiddle with things you're not familiar with by using the "Try it Yourself" links here: https://www.w3schools.com/html/html5_intro.asp

There are other changes, but most will be "you don't need that anymore" type messages from the validator.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

Be carefull about using html5 for epub, (yes, I do agree Dw should support epub creation, but it has difficulty keeping up wuth what web sites require, so no one hold their breath for that to happen). As I am not certain if the epub specs, (and readers) support using html5.

 

Whilst there isn't much difference between html5 and xhtml, there are cetain elements that are valid in xhtml but not in html5, (and vice-versa). So whilst it would be worth learning html5 for web development, it may not be for epub.

 

This is the html5 spec, (remember that unlike old html standards, html5 is a 'living standard', so there is no definitive version) -

html5 spec. 

Much of it you probably don't want, but DO read the semantic mark-up section.

 

as for epub -

/epub-spec.html 

That is the latest spec, which I think still recommends xhtml.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 28, 2020 Apr 28, 2020

Copy link to clipboard

Copied

Thank you all--that saved me a lot of time.  I can see that I'm using a round tool in a square hole.  Fortunately I can still validate directly with the W3C browser tool.

For kicks I changed the doc type (and a few other minor things as indicated by validation) and the file then validated just fine.  Since I'm not doing anything fancy (I prefer clean over bells and whistles, obviously), I'll follow the experiment through to see how the epubs validate.  I can see that XHTML is still preferred thanks to the provided link, but perhaps with a minimalist approach it won't matter.  I guess I'll find out!  🙂

This has been so helpful, and I appreciate everyone's knowledge and time!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

That is correct if you use HTML5 because of the Validator on http://validator.w3.org/nu. Will only validate HTML5, not the other Doctypes. If you have them validated, use The W3C Markup Validation Service, which will take all Doctypes.

No matter what doctype you select in DW, it will always validate with HTML5 doc and nothing else.
My tip is to change the link for the Validator in DW.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

quoteMy tip is to change the link for the Validator in DW.

By @Kajrov

==========

My advice is to migrate to HTML5 doc type.  There is no reason not to use it. Since 2014, HTML5 has been the web standard.  

  • You'll have no problems validating code,
  • You can do more with HTML5 -- especially on forms,
  • It's better suited for use on mobile devices & modern browsers.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 17, 2022 Jul 17, 2022

Copy link to clipboard

Copied

That's not done easily, I have over 2300 files on my site, is a mix between HTML, js, img, CSS files and the site is an old fashion frame site, that HTML5 doesn't take, and it shall also work on old IE that moany of my viewers have. I did make it in old Allier HomeSite that later been Macromedia HomeSite that was bought up by Adobe that incorporated in the old Dreamweaver and still has some overtake from HS. I begin use DW with DW CS4.
It's a old site from the end of 1990 decade. Even it is 95% Swedish and a very narrow site so, I have had over 500k visitors from all over the world. the site is to 80 % link site with over 25000 links.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 17, 2022 Jul 17, 2022

Copy link to clipboard

Copied

My goal is to take it over to Html5 and PHP site that I know will work for my site without making it alien for my users.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 17, 2022 Jul 17, 2022

Copy link to clipboard

Copied

LATEST

2300 static files is insane.  Nobody builds huge static sites anymore.  Switch to WordPress.  

 

WordPress is a CMS which will simplify site maintenance and collaboration from an online dashboard.  Multilingual sites use WordPress because there is a powerful plugin available for it called WPML https://wpml.org/  WordPress uses a blend of HTML5, CSS, JS, PHP & a MySQL database to store content.  Most web hosts support it. And some even install it for you like this one.

https://www.dreamhost.com/wordpress/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines