Re: On Henry's comment about documents with DOCTYPE but without markup declaration

On 2014-01-28 05:41, Henry S. Thompson wrote:
> Just some clarifications at this point.
>
> Paul Grosso writes:
>
>> I don't understand or particularly like the idea of introducing
>> the term "invalid".  I gather from what Henry says above that
>> he is using the term to mean "not well-formed" (or just not XML)
>> when he says that a well-formed (but not valid) document is
>> neither valid nor invalid.
> What I meant to claim, wrt the examples cited, was that documents
> without a document type declaration _cannot_ be valid, or invalid,
> because the definition of validity depends on _having_ a document type
> declaration.

I agree that documents without a doctype decl cannot be valid.
They can be either well-formed XML or not XML.  I'm still not
sure what "invalid" (or "not invalid") would mean.


>
> But part of the problem as reported stems from the fact that the
> spec. is unclear wrt what a validating processor should report when
> presented with a well-formed document which lacks a document type
> declaration.

Let's agree that by "validating processor" we mean "an XML
processor parsing in validating mode" to avoid considering
a tool that can parse in either validating or non-validating
mode as a single processor.

In section 5.2, the XML spec says:

  The behavior of a validating XML processor is highly
  predictable; it must read every piece of a document
  and report all well-formedness and validity violations.

Since the lack of a document type declaration clearly
implies the violation of several validity constraints,
it seems clear to me that the validating processor must
report all validity violations.


>> On the other hand, Henry says that <!DOCTYPE html><html/> is
>> "invalid", and then that confuses me, since that is well-formed.
> The example was easy to misread, sorry, but not was you quote it,
> rather:
> <!DOCTYPE html>
> <hmtl/>
>
> I should have used
> <!DOCTYPE html>
> <xyzzy/>
>
>


No, Henry, I did not misread or misunderstand the last example
in your message (the hmtl one).

My comment above refers to your earlier example and statement,
to wit:


> It would also probably be a good idea to clarify that as things stand
>
>    <!DOCTYPE html>
>    <html/>
>
> is, using the usual convention, _invalid_, where
>
>    <html/>
>
> is neither valid _nor_ invalid...

where--as I said in my previous message--you claim that
<!DOCTYPE html>
<html/>
is "invalid", but I believe it to be well-formed (do you
disagree that it is well-formed?), hence my confusion about
your definition of "invalid".

paul

Received on Tuesday, 28 January 2014 14:56:36 UTC