Re: XHTML validation bug (false pass)

On 20.02.00 at 12:56, David Brownell <> wrote:

>Terje Bless wrote:
>>On 20.02.00 at 08:22, David Brownell <> wrote:
>>>   Line 1:
>>>   Line 2:     <?xml version="1.0"?>
>>Ok, so it's a blank line before the XML PI(?) that isn't flagged by the
>>validator, but which should be?
>Well, an "XML PI" is the fatal error:  grammar rule [16] explicitly
>precludes them, regardless of the case used..  What's required is either:
>   - XmlDecl [23], which appears only at the beginnings of
>     full documents (which may optionally have a DTD);
>   - TextDecl [77], which appears only at the beginnings of
>     external parsed entities (both parameter and general).
>And it turns out that the parent productions [1] [30/79] [78] are where
>the "no whitespace before them" effect comes from.For diagnostic purposes,
>it's clearest to always treat "<?xml" as an XML or text decl.

It seems I'll have to go read up on XML before I stand a chance of making a
coherent coclusion here. Hopefully Gerald[0] has a better grasp of this
stuff then I do.

>Erase "XML PI" from your vocabulary.

*grin* Will do! :-)

My XML, or SGML for that matter, vocabulary isn't exactly impressive. :-(

>See above -- TextDecl is similar.  XML decls require a version, encoding
>is optional, 'standalone' is permitted.  Text decls require encoding, and
>an optional version is the only other thing permitted.

You are talking about required attributes here?

>>XML support in the Validator is still labelled as Experimental.
>Not from the official W3C validation service it isn't.  I just ran it
>seconds ago, and there was no mention of that at all on the resulting
>"XHTML brand of approval" page.

No? Crap! Geeeeraaaaallld!!! :-)

Wait a minute! Is this a XHTML file? Could it be that it is being validated
as if it were an SGML file? My head is still hurting from the last time we
went around on this issue, but IIRC XHTML files are being validated as a
weird form of SGML instead of XML. That would maybe account for it being
more permissive.

Could you give me a URL for the document in question?

>>>I've got an updated copy, which a few folk have sanity checked.
>>Can this be got from the usual suspects (oasis-open etc.)?
>No, but I sent it along to the WG chair.  I think I'll send it to
>the general list too.  You can grab:
>There's a README there explaining the status as of when I packaged
>it up.  A few things came up since then (re nondeterminism in content
>models, some fixes got lost).

Thanks. I'll grab it when I get at my development system.

>See the definition of "fatal error" in the spec.  What I said is accurate:
>it's permissible to report _errors_ (only) after the first fatal error.
>Not just validity errors.

OK. Thanks! It seems I'm badly in need of reading the XML spec again. Is
the XML Annotated at any easier to read? The XML spec alone gives
me hives (too much ISO shining through, methinks)! :-(

>>Do you think the Validator should stop processing after reporting the
>>first Well Formedness error or should it attempt to keep going and report
>>as many errors as possible?
>For the record, essentionally every XML parser I've worked with does the
>former.  So WFness errors in documents get fixed -- all but immediately.
>Which IMHO is the way to deal with them.
>At the moment I've got a mild preference to do it that way.  After all,
>wasn't _not_ doing that the reason we got into the HTML mess?  Not just
>with a validator, but with _every_ piece of software touching HTML?

You may be right. Given that XML is fairly new and with no expectations of
Bugwards Compatibility, one might even get away with being BOFHish about
it. :-)

[0] Gerald == Gerald Oskoboiny <>, the creator/maintainer.

Received on Sunday, 20 February 2000 17:13:57 UTC