Re: [CSS21] Wider variety of (non-junk) examples requested

On Fri, 26 Aug 2005 21:33:04 +0100, Chris Lilley <chris@w3.org> wrote:

> IH> and it's a perfectly fine extract of a valid HTML
> IH> document.
>
> How do we know that? Its *potentially* an extract of a valid HTML 4.01
> document. Its "feasibly valid". But if, for example, it was a child of
> head, or title, or img, or P, then it would not be valid.

If this example is changed to:

<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en">
<head>
<title>Example of a p in a div</title>
</head>
<body>
<div>Some text
<p>More text</p>
</div>
</body>
</html>

We won't know that it is valid XHTML/1.1! It will be "feasibly valid",  
because there might be some imaginary text before XML declaration or it  
might have been sent using imaginary HTTP protocol specyfying invalid  
encoding that makes example not well-formed.

I postulate that all CSS examples are presented with complete set of  
HTTP/1.1 headers using transfer-encoding:chunked to ensure that presented  
code is well-formed, valid and advocates careful coding practices.

Seriously though, even HTML4.01 spec is full of junk examples, according  
to your criteria.

-- 
regards, Kornel Lesiński

Received on Saturday, 27 August 2005 13:38:00 UTC