Re: Validator allows designers to do invalid nesting through <ins>

Jukka K. Korpela wrote:

> <img> within <pre> "works" just as well without the <span>.

Yes, and I like this effect.  Of course it "works" only for
fonts resulting in a height bigger than my small icons.
  
> Validators should be used (only) to detect and report syntax
> errors that you might otherwise miss to notice; but here you
> would use <span> just to prevent it from reporting an error

That's true.  Unfortunately I'm not up to writing my own DTD
based on XHTML 1.1, otherwise I'd do it immediately, because
I'd want something as "strict" as possible still working with
legacy browsers.

> putting <img> inside <pre> (directly or indirectly) violates
> HTML specifications.

It shouldn't, <pre> could be handled like a <table> where each
character occupies a cell, and an <img> could be handled like
colspan, where the number of cells depends on the width and
the font.  Okay, you convinced me to remove all height= and
width= on my weird <img> within <pre> page, but I'm too lazy
to create a proper table for this purpose.

Oops, I also had some <a><img /></a> within this <pre>, same
problem as <span><img /></span>.

> Actually if you upgraded from XHTML to HTML 4.01 :-), a
> validator would still report an error if you used the extra
> <span> markup.

That's one of many reasons why I'll never "upgrade" to HTML:

If the validator says "valid" for XHTML my chances are good
that some browsers actually can display the page.

But if the validator says "valid" for HTML my chances are
lousy, because there is no browser supporting "valid" HTML.

Maybe the W3C browser could do it, but its market share is
not really bigger than say my good old Netscape "3.x" 2.02.

> (SGML instead of XML) - in particular, it has "exclusion
> exceptions" which allow the DTD author specify that an
> element must not indirectly contain certain elements even
> though they would otherwise be permitted.

SGML has a lot of interesting features, but as long as there
is no browser to use these features I'm not very interested.

Would "schema" allow to specify nesting rules ?  All I know
about "schema" is that it supports data types, and XHTML 2
uses it (among others).

 [<frameset><!-- ugly frames --><noframes><body><h1>]
> It's not a matter of nesting. In HTML 4.01, where you may
> omit the <body> _tag_ there, there is still a <body>
> _element_

Oops, yes, and normally I like the "verbosity" of XHTML, but
in that case I didn't notice it as what is.  It's again only
one page, because I normally don't use frames.
  
Sometimes I create pages with links trying to bypass weird
JavaScript and frame constructs of 3rd parties, and here each
frame had a JavaScript reloading the frameset if it wasn't
there.

This "reloader" was very stupid, it only checked "are there
any frames and otherwise reload my stuff", so all I had to
do was to create a dummy frame for users with JavaScript...

Now obsolete, the 3rd party does not more use frames.  But
I keep my page just in case if I ever need this trick again.

                       Bye, Frank

Received on Tuesday, 10 August 2004 22:24:34 UTC