Highlighted

W3C validation defaulting to insanely wrong doctype in spite of declaration

Community Beginner ,
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.

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

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 

Views

2.5K

Likes

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

W3C validation defaulting to insanely wrong doctype in spite of declaration

Community Beginner ,
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.

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

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 

Views

2.5K

Likes

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
Apr 27, 2020 0
LEGEND ,
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.

 

Likes

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
Reply
Loading...
Apr 28, 2020 2
Adobe Community Professional ,
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

 

 

Likes

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
Reply
Loading...
Apr 28, 2020 1
Adobe Community Professional ,
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 

Likes

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
Reply
Loading...
Apr 28, 2020 1
Community Beginner ,
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.)

Likes

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
Reply
Loading...
Apr 28, 2020 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Apr 28, 2020 1
LEGEND ,
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.

Likes

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
Reply
Loading...
Apr 28, 2020 1
reandn LATEST
Community Beginner ,
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!

Likes

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
Reply
Loading...
Apr 28, 2020 0