Presentation By Silvia Pfeiffer

Freely adapted from a Robin Berjon presentation

How To Read A
Spec

"This specification should be read like all other specifications. First, it should be read cover-to-cover, multiple times. Then, it should be read backwards at least once. Then it should be read by picking random sections from the contents list and following all the cross-references."
Ian Hickson, WHATWG FAQ

Why, Oh, Why?

Find The Spec

http://www.w3.org/TR/

Weird language?

Conformance Requirements

http://www.w3.org/TR/test-methodology/

Must, Should, May

Producer vs. Consumer

The src attribute of the content element must be a valid non-empty URL potentially surrounded by spaces.

A producer conformance requirement

If the src attribute of the content element is absent or an empty string, then the user agent must ignore this element.

A consumer conformance requirement

If the src attribute of the content element is absent or an empty string, then the user agent must ignore this element.

Product

If the src attribute of the content element is absent or an empty string, then the user agent must ignore this element.

Strictness level

If the src attribute of the content element is absent or an empty string, then the user agent must ignore this element.

Prerequisites

If the src attribute of the content element is absent or an empty string, then the user agent must ignore this element.

Behaviour

If the src attribute of the content element is absent or an empty string, then the user agent must ignore this element.

Defined Terms

Finding Definitions

Finding References

Testable Assertions

Mapping to code

<content>
<content src=''>
<content src='does_not_exist.html'>
<content src='something_real.html'>
<script>
  var i = 1;
  var attrs = $("content")[i].attributes;
  alert(attrs.length >= 1 ? 
              "WIN!" : 
              "FAIL!");
  alert(attrs.src.value === '' ? 
              "FAIL!" : 
              "WIN!");
</script>
      

Thank You!