HighDots Forums  

Re: ??? Crazy XHTML Strict Validation Problem ???

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Re: ??? Crazy XHTML Strict Validation Problem ??? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lachlan Hunt
 
Posts: n/a

Default Re: ??? Crazy XHTML Strict Validation Problem ??? - 10-05-2005 , 06:16 PM






rbronson1976 wrote:
Quote:
The public identifier, to my knowledge, is optional.
Yes, technically, it is according to the XML rec.

Quote:
The SYSTEM identifier is what provides the DTD.
Yes, it references the external DTD.

Quote:
I've also tried other (custom) PUBLIC Identifiers, to no avail.
You misunderstood what I meant. The validator switches to XML mode for
known PUBLIC identifiers for XML documents, such as XHTML, regardless of
the MIME type. Since the validator, obviously, does not know about your
custom PUBLIC identifier, it does not know that it should continue in
XML mode and, because it was served as text/html, defaults to SGML mode.
Using an XML MIME type, it uses XML mode.

Quote:
You also said, "...the validator does not know that the system
identifier is referencing an XML DTD, rather than an SGML DTD, and
because the document is being served with the wrong MIME type..."

That's an odd thing to say considering the document *DOES* validate
correctly if I use the first DOCTYPE, even though, according to you, I
am using the wrong MIME type (text/html).
That's because the validator knows the XHTML DOCTYPEs

Quote:
So, if the MIME type is causing the problem, why doesn't it cause a
problem with the first DOCTYPE?
Because, upon encountering a document with a known XML DOCTYPE, the
validator knows that it should continue in XML mode.

Quote:
I do not believe the "text/html" MIME type is wrong or causing the
problem...
In addition, "... XHTML Documents which follow the guidelines set forth
in Appendix C, 'HTML Compatibility Guidelines' may be labeled with the
Internet Media Type "text/html", as they are compatible with most HTML
browsers."
Although it is allowed by the recommendation, you should be aware that
doing so is considered harmful.

Quote:
So, I don't think you can say I'm using the wrong MIME type.
No, it is the *wrong* MIME type, even if it is technically allowed under
certain conditions.

Quote:
Finally, I did try changing the MIME type in the <meta> element to
"application/xhtml+xml" but the same problem occurred.
Change the MIME type in the HTTP headers, the meta element is only
useful for setting the charset in text/html documents, when the charset
parameter has been omitted from the HTTP Content-Type header, or when
the file is not being served over HTTP, or other protocol with such
information available.

In the HTTP headers, for HTML, use:
Content-Type: text/html; charset=XXX
(where XXX is whatever encoding you have used)

For XHTML, use:
Content-Type: application/xhtml+xml

(XML documents are self describing and don't need charset information in
the HTTP headers)

Quote:
If anyone *really* knows why I am getting these validation errors,
please respond...but no more half-baked, useless guesses, please.
I do *really* know why you are getting these validation errors, it was
not a "half-baked, useless guess". If you can't remain civil in the
future and not insult those that choose to take the time to assist you,
simply because you failed to understand the advice given, then don't
expect too much from anyone else in the future.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox


Reply With Quote
  #2  
Old   
Eric B. Bednarz
 
Posts: n/a

Default Re: ??? Crazy XHTML Strict Validation Problem ??? - 10-07-2005 , 12:00 PM






Lachlan Hunt <spam.my.gspot (AT) gmail (DOT) com> wrote:

Quote:
In the case of the W3
validator, XML mode is triggered by an XML MIME type, which is the
correct way to do what you want.
I wouldn't know of any 'XML mode', this is basically not a question of
XML versus SGML but a question of locating an SGML declaration.

The SGML declaration for XML

<http://validator.w3.org/sgml-lib/xml.dcl>

is -- dramatically -- different from the one for HTML 4

<http://validator.w3.org/sgml-lib/REC-html401-19991224/HTML4.decl>

which in turn is slightly different from e.g. the one for HTML 3

<http://validator.w3.org/sgml-lib/REC-html32-19970114/HTML32.dcl>

And so on.

Using a custom DTD for validation on a remote system is likely to get
you in trouble sooner or later if you don't know the default
declaration which will be choosen in advance (pick a card, and jolly
good luck).


On a side note, it's no good to draw conclusions from 'how stuff works'
by observing some particular behaviour in the wild; whether or not the
FPI OVERRIDEs the sytem identifier is just something else to be
configured in the catalog, see e.g.

<http://validator.w3.org/sgml-lib/REC-html401-19991224/HTML4.cat>

Id est, on a different validating system, the OP and Queen Victoria
might encounter quite different behaviour.

(On yet another side note, if you, for example, always use the html
4.01 strict dtd, you'd add something sensible like

doctype html strict.dtd

to your catalog and could free all your documents from the obsolete
cruft and just use <!doctype html system> for validation purposes.
It's utterly silly to want remote validation after publication;
validation, if at all, is useful in the production process, starting
with a local validating system and an editor that can read the catalog
and the dtd as well.)

Quote:
Not only will Page Valet allow you do force XML mode, but it's
also a much better XML validator
It isn't a question of 'better' but rather yes or no. Page valet lets
you choose an XML parser, the w3c validator doesn't. Thus the latter
isn't an 'XML validator' (validating XML processor) at all.


--
Goodbye and keep cold


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.