conformance constraints on producers that go beyond syntax

View: New views
5 Messages — Rating Filter:   Alert me  

conformance constraints on producers that go beyond syntax

by Jonathan Rees-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This sentence from http://www.whatwg.org/specs/web-apps/current-work/
is really pretty thought-provoking...

"Authors must not use elements, attributes, and attribute values for
purposes other than their appropriate intended semantic purpose."

This bears on our language versioning discussion, because it reminds
us that conformance requirements for producers may go beyond just the
requirement that what they produce be syntactically well-formed; they
can say that based on its circumstances, the producer MUST choose
certain syntactically correct texts over others. You don't often see
this kind of thing in language specs, although it is very easy to
imagine in specs for larger systems of which a language is a part
(such as: if the heart rate button is depressed then the generated
document MUST contain a <heartrate> element that correctly records the
measured heart rate).

"Use the word 'red' to describe red balls and 'green' to describe
green balls" would be a similar sort of producer constraint, as would
"don't issue commands that would fill up the file system" or even "do
not lie". Some "good practice notes" fall in a similar category.

This kind of producer constraint is natural if you think of consumer
and producer as symmetrical: the consumer observes something in the
world (perhaps including its own internal state) and creates a
document "expressing" something, maybe a desire, in response; the
consumer then reads the document and does something that makes the
world (perhaps its own internal state) react.  world -> document ->
world. (This is the language-game framework I've been trying to get
you all interested in.) But we rarely see this because language specs
usually assume that the producer's motives for generating a document
are its own g**n business and that it will figure out what document it
needs to generate based on what it wants consumers to do / understand.
Producer mistakes are self-correcting - the consumer doesn't do what's
wanted - so correct expression of desire doesn't have to be mandated.

(On an unrelated point - is the above requirement part of HTML4? I'm
pretty sure it's not generally obeyed in the wild. If not, doesn't
this constitute a seriously incompatible change from HTML4 to HTML5,
creating a population of HTML4-conforming producers that are not
HTML5-conforming producers?)

-Jonathan  (just having some fun)


Re: conformance constraints on producers that go beyond syntax

by Henry S. Thompson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan Rees writes:

> (On an unrelated point - is the above requirement part of HTML4?

Indirectly, at least, yes, insofar as HTML4 is an SGML application.

The SGML spec. defines the 'document type definition' of an SGML
application as specifying both the syntax _and_ semantics of the tags
defined by that application, and documents are supposed to conform to
document type definitions.  Violation of this is colloquially called
'tag abuse', i.e. using a tag for other than its documented purpose
and is recognised in at least the old-school markup community (see
e.g. [1]) as a Bad Thing.

ht

[1] http://www.xmlgrrl.com/publications/DSDTD/ch04.html#tag.abuse
- --
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@...
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFKt58HkjnJixAXWBoRAieWAJ9OVBHd607PYoqr2B5MeuIORlPhLgCeLAd3
QtQuq3rttokXfdMBUWLSyOE=
=YZY+
-----END PGP SIGNATURE-----


Re: conformance constraints on producers that go beyond syntax

by Jonathan Rees-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Interesting. Out of curiosity I took a look at the specs (of course
I'd never think of doing this first : ). The HTML4 spec defines what
it means by conforming user agent and (implicitly) conforming
document, with a reference to SGML. It explicitly says that its advice
to authors is considered "good practice" and non-normative. There's
nothing suggesting that it inherits anything from SGML other than its
definition of conforming document. The HTML5 draft is careful to say
"This specification describes the conformance criteria for user agents
and documents" omitting any mention of authors. SGML has been
expunged. The bit about author good practice has been removed,
promoting the no-tag-abuse rule to normative status.

The words "authors must" occur several more times in the draft but in
each case (other than the one I quote) the constraint can be
operationalized as a constraint on documents, not on authors. (In
fact, since the constraint is only on authors, not documents, this
allows for the existence of conforming documents that cannot be
generated by any conforming author!) If I've identified all the author
conformance constraints, then we're left with no-tag-abuse as the sole
conformance constraint on authors (other than that they ought to
generate conforming documents).

Jonathan

On Mon, Sep 21, 2009 at 11:43 AM, Henry S. Thompson <ht@...> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jonathan Rees writes:
>
>> (On an unrelated point - is the above requirement part of HTML4?
>
> Indirectly, at least, yes, insofar as HTML4 is an SGML application.
>
> The SGML spec. defines the 'document type definition' of an SGML
> application as specifying both the syntax _and_ semantics of the tags
> defined by that application, and documents are supposed to conform to
> document type definitions.  Violation of this is colloquially called
> 'tag abuse', i.e. using a tag for other than its documented purpose
> and is recognised in at least the old-school markup community (see
> e.g. [1]) as a Bad Thing.
>
> ht
>
> [1] http://www.xmlgrrl.com/publications/DSDTD/ch04.html#tag.abuse
> - --
>       Henry S. Thompson, School of Informatics, University of Edinburgh
>                         Half-time member of W3C Team
>      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
>                Fax: (44) 131 651-1426, e-mail: ht@...
>                       URL: http://www.ltg.ed.ac.uk/~ht/
> [mail really from me _always_ has this .sig -- mail without it is forged spam]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFKt58HkjnJixAXWBoRAieWAJ9OVBHd607PYoqr2B5MeuIORlPhLgCeLAd3
> QtQuq3rttokXfdMBUWLSyOE=
> =YZY+
> -----END PGP SIGNATURE-----
>


Re: conformance constraints on producers that go beyond syntax

by Henry S. Thompson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan Rees writes:

> There's nothing suggesting that [HTML] inherits anything from SGML other
> than its definition of conforming document. The HTML5 draft is
> careful to say "This specification describes the conformance
> criteria for user agents and documents" omitting any mention of
> authors. SGML has been expunged. The bit about author good practice
> has been removed, promoting the no-tag-abuse rule to normative
> status.

I suspect we have a [tendentious, in the spirit of this thread :-]
difference of interpretation here.  I interpret the SGML definition of
conformance as applying to documents and that _includes_ the
requirement that the semantics of the documents must conform to the
semantics specified by the application in the document type
definition, which means, _inter alia_ no tag abuse.

So HTML _does_ inherit the prohibition on tag abuse from SGML, IMO.

ht
- --
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@...
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
     
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFKt7fIkjnJixAXWBoRAjcfAJ9kjFyOvZbeDsDgDgze7MKIbdIxuQCfQ9my
4vkETvbIY8oOSCpn1i0CjlY=
=IYSS
-----END PGP SIGNATURE-----


Re: conformance constraints on producers that go beyond syntax

by Ian Hickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 21 Sep 2009, Jonathan Rees wrote:

>
> The HTML5 draft is careful to say "This specification describes the
> conformance criteria for user agents and documents" omitting any mention
> of authors. [...]
>
> The words "authors must" occur several more times in the draft but in
> each case (other than the one I quote) the constraint can be
> operationalized as a constraint on documents, not on authors. (In fact,
> since the constraint is only on authors, not documents, this allows for
> the existence of conforming documents that cannot be generated by any
> conforming author!)

I've added a clarification to HTML5 to explicitly say that conformance
requirements on authors are equivalent to conformance requirements on
documents. The distinction was not intended to be meaningful.

Cheers,
--
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'