W3C

QA Framework: Specification Guidelines

W3C Working Draft 22 November 2004

This version:
http://www.w3.org/TR/2004/WD-qaframe-spec-20041122/
Latest version:
http://www.w3.org/TR/qaframe-spec/
Previous version:
http://www.w3.org/TR/2004/WD-qaframe-spec-20040830/
Editors:
Karl Dubost, W3C
Lynne Rosenthal, NIST
Dominique Hazaël-Massieux, W3C
Lofton Henderson, CGM Open
Contributors:
See Acknowledgments.

Abstract

A lot of effort goes into writing a good specification. It takes more than knowledge of the technology to make a specification precise, implementable and testable. It takes planning, organization, and foresight about the technology and how it will be implemented and used. The goal of this document is to help W3C editors write better specifications, by making a specification easier to interpret without ambiguity and clearer as to what is required in order to conform. It focuses on how to define and specify conformance for a specification. Additionally, it addresses how a specification might allow variation among conforming implementations. The document is presented as a set of guidelines or requirements, supplemented with good practices, examples, and techniques.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is the 22 November 2004 Last Call Working Draft (WD) of “QA Framework: Specification Guidelines”, made available by the the QA Working Group of the W3C Quality Assurance (QA) Activity for discussion by W3C members and other interested parties. For more information about the QA Activity, please see the QA Activity statement.

This is the Last Call, third published version of this document after the decision to completely redesign the QA Framework, resolved by the QA Working Group at its 2004 Technical Plenary face-to-face. It is a lighter-weight, less authoritarian, more user-friendly and useful version of the previously published Candidate Recommendation version of the QA Specification Guidelines.The changes since the previous version are documented in the changelog and highlighted in a separate document.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Patent disclosures relevant to this specification may be found on the Working Group's Patent disclosure page in conformance with the W3C Patent Policy of 5 February 2004. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) with respect to this specification should disclose the information in accordance with section 6 of the W3C Patent Policy.

The Working Group expects this specification to become a Recommendation. The Last Call review period ends 28 January 2005, at 23:59 EDT. Please send Last Call review comments on this document before that date to www-qa@w3.org, the publicly archived list of the QA Interest Group. Reviewers please note that your comments will be publicly archived and available; do not send information that should not be distributed, such as private data. Last Call Working Draft status is described in section 7.4.2 of the W3C Process Document. To the extent possible, please provide a separate email message for each distinct comment.

Table of contents

Appendix

Introduction

Scope

This document is a guide for W3C specifications editors and authors. It provides guidelines for writing better specifications. This document differs from other W3C process and publication related documents in that it looks at specifications from a conformance viewpoint. It address the most basic and critical topics with respect to conformance, including how to convey what is required for an implementation in order to conform and how to allow variation among conforming implementations.

What is a specification?

A specification is a set of technical requirements which aim at defining a reliable interface to accomplish a given task.

Specifications can be defined in one or several documents, and can import requirements of other specifications with normative references. Some specifications, denoted below as umbrella specifications, create their own interfaces by simply grouping requirements of existing specifications in a well-defined manner.

Figure 1: Umbrella specification

Graph to express the notion of composite document specification.

On this figure, the technology is composed of two modules (defining functional division of the technology), a profile (defining the requirement of implementation for a specific device) and a primer (introducing the technology and its basic concepts). They are grouped together by a document, “umbrella specification”, which makes it a logical, usable and complete technology specification.

Goals and Motivation

The goal is to enable Working Groups to produce specifications that are precise, easier to interpret without ambiguity or confusion, and clearer as to what is required in order to conform. Good specifications lead to better and more interoperable implementations and foster the development of test suites and tools.

Everyone benefits from having well-written specifications. Editors may have less rework and thus, fewer issues raised during the development of the specification, and fewer errata once it is finished. Implementers can implement sooner and have a better chance to conform to the specification. Test developers are able to derive unambiguous test assertions. Users benefit by having interoperable solutions. W3C gains by having recommendations produced with higher quality and reduced maintenance.

Why Specification Guidelines?

It is not an easy task to write accurate, clear, complete, unbiased specifications. It requires planning, organization, and foresight about the technology, how it will be implemented and used, and how technical decisions affect conformance. This document provides a collection of requirements, good practices, examples, and techniques that leads the reader through the decisions that need to be made in order to write precise requirements and establish, define, and specify conformance for specifications. Realizing that editors and authors are busy, under pressure to get the specification published, and already have a reading list of W3C documents (a good place to start, W3C Editor's Home Page [EDITOR]) this document can be used as a checklist of things to consider, a how-to guide with examples and techniques which can be adapted, and a reference for understanding conformance concepts and terminology.

Audience of this document

The primary audience of this document is editors and authors, however, it is applicable to a broader audience including:

This document makes no distinction between the terms editors and authors and refers to them collectively as editors.

About this document

This document is a practical guide to writing a specification, presenting editors with topics to consider. Consequently, much of the document is non-normative recommendations labeled Good Practices. There are however, a limited number of normative requirements, labeled Requirements, that must be implemented in order to conform to this document. The overall objective of these requirements and good practices is to facilitate the creation of a complete conformance clause in every specification. A conformance clause template [CONF-TEMPLATE] is provided to assist editors satisfy the requirements of this document and end up with a conformance clause. Note that for some specifications (e.g., The QA Handbook [QA-HANDBOOK], Architecture of the World Wide Web, First Edition [WEB-ARCH]) where conformance is not an issue (e.g., no normative content), the conformance clause may be an explanation of why there is no "conformance to this document" and may be presented in another section rather than in a separate conformance section.

The topics presented are herein inclusive (self-contained) providing information needed to understand and successfully apply the requirement, although related information and advanced topics may be referenced.

If in a hurry just read the first section, Specifying conformance — this may be all you need to read in order to reach the expected outcome of adhering to this document, i.e. specificying conformance. It serves as a roadmap to other parts of this document, which help achieve specifying conformance.

Structure of this document

This document is organized into a series of main topics such as Specifying Conformance and Managing Variability. In each of these topic areas, Requirements and Good Practices are presented and explained. Each Requirement and Good Practice is accompanied by techniques and examples. The techniques illustrate basic (and non exhaustive) questions or methods to help realize the Requirement/Good Practice and write bits of the specification. The examples are explanations or extractions from existing W3C specifications which specifically illustrate the point made in the Requirement/Good Practice.

The conformance requirements of this document are described in the conformance section of this document. A specification editor who wishes to conform to Specification Guidelines must satisfy the conformance requirements in the conformance section of this document. It basically defines the requirements as normative and the good practices as informative.

Other QA Framework document

This document can be used as a stand alone document or as part of a family of QA Framework documents designed to help the Working Groups improve all aspects of their quality practices.

Guidelines

1 Specifying Conformance

Clear presentation of what is meant by conformance to the specification is crucial to successful interoperability of implementations. The conformance model, its description and the language used to convey normative information not only determines the testability of a specification, but also influences the overall implementation landscape  e.g., multiple types of conformance resulting in numerous, fragmented, conforming implementations or a limited type of conformance resulting in few allowable variations among implementations.

Conformance is the fulfillment of a product, process, or service of specified requirements. These requirements are detailed in a specification as part of a conformance clause and in the body of the specification. A conformance clause is a section of a specification that states all the criteria that must be satisfied in order to claim conformance to the specification.

1.1 A conformance clause is essential

A good conformance clause is the ultimate goal of these guidelines, and is sanctioned by conformance to this specification

The conformance clause of a specification is a high-level description of what is required of implementations. It, in turn, refers to other parts of the specification for details. Ideally, it is the root source from which readers can find any conformance-related information.

For some specifications, the conformance model may be straightforward and simple, and the conformance clause template [CONF-TEMPLATE] when completed, may provide most of the information needed in a conformance clause.  For others, the conformance model is complex or convoluted, and the Advanced Topics references may be invaluable in creating the conformance clause.

1.1 Requirement A: Include a conformance clause.

What does it mean?   The conformance clause provides the answers to all the important question: what may conform and how? The conformance clause defines at a high-level, what is required of implementers of the specification.  It, in turn can refer to other parts of the specification or other specifications.  The conformance clause may partition the technology into functional subsets, such as profiles, modules or other structures.  Additionally, it may specify minimal requirements for certain functions, as well as extensibility, optional features and alternative approaches and how they are to be handled.

Why care? The conformance clause defines what is required to claim conformance: as such,  it provides communication between the specifications creators, implementers, and users as to what is required, and gives meaning to the phrase, “conforming implementation”.  Moreover, it facilitates the consistent application of conformance within a specification and across related specifications.  It promotes interoperability.

Techniques
Examples

Ruby Annotation [RUBY] specification is an example of a short specification with a detailed conformance clause.

SVG 1.0 [SVG11] specification contains a detailed conformance clause for a complex modular technology.

1.1 Good Practice B: Define the specification's conformance model in the conformance clause.

What does it mean? The conformance model is the conceptual framework in which conformance is defined. It consists of and is defined by addressing at least these three topics:

Why care? The key is to communicate to the reader what conformance to the specification is all about.  It provides a framework for implementers to know what they need to build in order to conform and the different ways that they could claim conformance.  It provides users/buyers a basis to express their requirements.

Techniques
  1. List the classes of products that are targeted by the specification
    1. Identify the types of products will implement the specification
    2. If not already done (above step), group the products into a generic category – this is the class of product. (e.g., content, user agent, protocol, API, specification)
  2. List conformance designations or conformance concepts. To help realize this, consider these questions.
    1. Does conformance mean something different for different classes of products?
    2. Is more than 1 type of conformance defined – e.g., different designations (well-formed, valid) or degrees of conformance (A, AA, AAA)?
    3. Is conformance tied to the class of product and similarly named (e.g, host-language conformance, document conformance)?
  3. Create a name for each way that conformance can be qualified – i.e., label it
    1. If the specification is subdivided into modules, profiles and/or levels, is there a conformance designation associated with each type of subdivision?
    2. If the specification has options and extensibility, will these have an affect or be affected by the conformance designation?
  4. Draw a diagram to put it all together – sometimes its easer to work from a picture
    1. Diagram the classes of products with associated conformance designations,
    2. Add the subdivisions and any other variability (e.g., options, extensibility)
    3. Extract from this diagram and define the conformance model.
    4. Write the description into the specification. Bonus - if the diagram help to understand the model, include it.

Figure 2: Conformance Model of Ruby Specification

Graph illustrating the Ruby Conformance Model

Ruby Annotation [RUBY] specification defines two types of conformance: Simple and Full, which are tied to the content models. The specification defines six types of products that we could group in 3 classes of products (content, specification, user agent). For each of them the conformance section defines the requirement to fulfill Simple or Full conformance.

Examples

XML 1.0 [XML10] has 2 classes of products (document and processor), each of those have 2 conformance degrees (well-formed/valid and validating/non-validating); we could add xml:base, xml namespaces and xlink as "modules" for xml even though they haven't been formally defined as such

SVG 1.1 [SVG11] has roughly 4 classes of product (markup fragments with various extents, generators, interpreters and viewers). Some of these classes of product have various degrees of conformance (Appendix G: Conformance Criteria [SVG11]) (e.g. static / dynamic for interpreters, static/dynamic * high-quality for viewers); SVG 1.1 also defines modules, which are grouped into profiles (tiny/mobile/full).

1.1 Good Practice C: Specify in the conformance clause how to distinguish normative from informative content.

What does it mean? Normative content is the prescriptive part of the specification, whereas informative content is for informational purposes and assists in the understanding and use of the specification. Content includes all sorts of different forms — not only descriptive prose, but illustrations, examples, use cases, formulae and other formalisms.

Why care? Conformance of implementations is defined by and measured against normative content.  Distinguishing normative content from that which is informative helps to make sure the reader can find the normative content, knows for sure that it is normative, and doesn’t fail to notice a normative section.  This good practice is aimed at the high level partitioning of information (e.g., sections) in a specification.

Techniques
  1. For each section in the specification,
    • Determine if the content is normative or informative and, explicitly label it as either ‘normative’ or ‘informative’. 
    • Make the label part of the section heading (e.g., Informative References), as parenthetical text with the heading (e.g., Glossary (normative)),
    • Or create a list of each section and indicate its normality, (e.g., this document’s conformance section’s Normative Parts).
  2. In the conformance clause, explain what the use and meaning (if necessary) of the words used to convey the normality and informality of the content. See 3.2 Requirement A: Use a consistent style for conformance requirements and explain how to distinguish them.
  3. Try to avoid language which sounds normative in an informative section. It might lead the specification users to wrong assumptions.
Examples

XHTML 1.0 [XHTML10] is using the words of RFC2119, but in an extended way (See Definitions [XHTML10]). They define the exact terminology for each word.

1.2 Specify how to make conformance claims

The central message of this section — “have a good conformance clause” —has many ancillary details. Because the conformance clause is the foundation for defining and measuring conformance, it is also the basis for assessing conformance claims. One detail worthy of attention is “valid conformance claims”.

Rather than live with the infinite varieties of creative conformance claims that can arise in a vacuum, the specification can be proactive.

1.2 Good Practice A: Provide the wording for conformance claims.

What does it mean? It is inevitable that people (e.g., vendors, purchasers) will either claim conformance or demand conformance to a technology. In fact, claiming conformance to a technology may be required in certain situations. Thus, it is important to provide a consistent and unambiguous way for these claims to be made. Identification of the specification version, class of products, and conformance label are some of the items that could be part of such wording.

Why care? Having a framework by which conformance claims can be made for a particular usage of the technology, minimizes confusion by people who are interested in such claims. There are many contexts for which conformance claims are sought, including legal as part of regulations, laws, or policies and commercial when selling or buying a product.

Techniques
 

Conformance Claim Template:

Form 1:

  • Specification title, date, and version:  Foo Specification, version 1.0, 29 February 2003:
  • Specification URI: http://www.example.org/TR/2003/FOO-20032902
  • Conformance designation satisfied: "conformant processor”
  • Product name: My_Processor, version 1.2, 1 January 2004
  • Date of claim:  1 April 2004
 

Form 2:

On 1 April 2004, My_Processor, version 1.2, 1 January 2004 claims conformance as a “conformant processor” to the FOO Specification 1.0, 29 February 2003, available at http://www.example.org/TR/2003/FOO-20032902

Examples

WCAG 1.0 [WCAG10] has good examples of a specification explaining how to make a conformance claim depending on the degree of conformance.

1.2 Good Practice B: Provide an Implementation Conformance Statement proforma.

What does it mean? An Implementation Conformance Statement (ICS) provides standardized information about the conformance of an implementation to the specification. It is used to indicate which capabillities and optional features have been implemented, as well as the limitations of the implementation. An ICS typically takes the form of a questionnaire for implementer to complete.

This Good Practice suggests that the specification itself include an ICS proforma.

Why care? An ICS provides a concise view of a specification’s conformance model. View the ICS as a template, where its organization, format and content can provide implementers and users a quick overview of the specification's features, subdivisions of the technology, conformance requirements, etc. It can be especially valuable as a statement of conformance, where implementers indicate which mandatory and optional features they implement and document the presence of extensions. Once completed by an implementer it can be used as part of the conformance claim. Additionally, an ICS can be used to identify the subset of a test suite that would be applicable to the implementation to be tested: this is useful first when establishing an interoperability report, and then when setting up a conformance testing program.

Techniques
  1. Create a list, table or form listing all features (capabilities) and indicating if it is mandatory or not.
  2. Provide space for the implementer to check: Yes, No, Not Applicable
  3. Organize the features according to the subdivisions of the specification or in the order they occur in the specification or in some other logical grouping
  4. If there are dependencies, express them. (For instance, if No to this question, jump to the next section.)
  5. Provide a tool to help implementers fill out the ICS and produce a report (e.g., EARL).
Examples

QA Specification Guidelines provides an ICS [QA-SPEC-ICS] to help implementers to verify the conformance to this document. Good practices (informative) and Requirements (normative), organized following the sections of the document, are given in a table where implementers can check yes, no or not applicable.

Web Content Accessibility Guidelines 1.0 [WCAG10] provides a checklist of checkpoint which helps the implementer to verify the accessibility of its HTML document. (See checklist of checkpoints in [WCAG10])

1.2 Good Practice C: Require an Implementation Conformance Statement as part of valid conformance claims.

What does it mean? This simply puts together the previous two good practices. Not only could the specification provide an ICS proforma for implementers, but it could require it to be linked from its standardized conformance claim template.

Why care? Providing a filled ICS with the conformance claim might help customers and users to verify easily the level of support of individual requirements of the specifications. It also strengthens the value of the claim.

Techniques
  1. Give precise instruction how the ICS must be part of the conformance claim. It might be an external document, a link to precise dated document, etc.

2. Setting up Groundrules

2.1. Scope

The path to a quality specification begins with its scope.  It is critical to convey what the specification is about by describing its intent and applicability.  As the specification develops, it is a good idea to revisit the scope to make sure it still reflects the intent of the specification or if it needs to be modified.

2.1 Requirement A: Define the scope.

What does it mean? Describe what the specification is about.  Let the reader know what is covered in the specification.

Why care? This is one of the first sections a reader reads, so it is important to capture their attention and make sure they understand what the specification is about. It helps to keep the specification content focused.  It also help readers know the limits or boundaries of the specification and whether it is of interest to them.

Techniques
Examples

Many W3C specifications have included a scope prose in the Abstract section. We advocate making the scope a separate section in the body of the specification, making it easy to find and insuring that it is an item in the table of contents.

Could have been better:

Composite Capability/Preference Profiles (CC/PP): Structure and Vocabularies 1.0 [CCPP-VOCAB]: From CC/PP Scope section “CC/PP Structure and Vocabularies … defines a client profile data format, and a framework for incorporating application- and operating environment-specific features.”

2.1 Good Practice B: Provide examples, use cases, and graphics.

What does it mean? Illustrate concepts, behaviors, functionality, interaction, etc. through what ever means makes sense, such as examples, use cases, graphics, and sample code. This aids in the understanding of the specification, especially for areas that are innately complex or for which the Working Group has had to explain to its members or the public.  Additionally, a set of broad examples and use cases can help to clarify the specification’s scope.

Why care? It is difficult to understand some concepts, behaviors, functionality or other aspects of a specification without informative interpretations to aid the reader. Providing the reader with additional information beyond the specification’s prose, can only help in achieving implementation and interoperability.

Techniques

It is up to the Working Group to determine the best way to illustrate the scope and other parts of the specification. Typically, the nature of the specification influences the type of examples, uses cases, graphics, etc that make sense.

Examples

For markup specifications, provide at least one example of each markup construct; illustrate each transformation capability with an example showing input and output.

SVG 1.1 [SVG11]: For each element of the SVG specification, there is a verbose definition of the element, the DTD definition, the attribute definitions and an example. For instance, in the definition of the element rect, there are precise examples with the markup to generate a rectangle, a rendering of the markup as an image to help people visualize it and a separate file with the said markup.

HTML 4.01 [HTML401]: The HTML 4.01 specification has been designed in a very educative way. By its design, the specification has very good examples.

2.2 What needs to conform

2.2 Requirement A: Identify who or what will implement the specification.

What does it mean? Clearly identify the class of products (i.e., type of products or services) to which the specification applies.  If multiple classes of products are targeted by the specification, make sure each are described.   Examples of classes of products include: content, producer of content, player, protocol, API, agent, guidelines.

Why care? It helps define the scope of the specification and is needed when defining conformance.  It also helps the reader know what is being targeted by the specification – that is, to discover and focus on what they have turned to the document for and avoid what they may find immaterial.

Techniques
Examples

Mathematical Markup Language (MathML) Version 2.0 (Second Edition) [MATHML20] defines output-compliant authoring tools and input-compliant rendering/reading tools.

SMIL 2.0 Language Profile ([SMIL20], chapter 13)has 2 classes of products: documents and basic user agents.

The conformance section of Ruby [RUBY] is very explicit and detailed about classes of product. For each of these classes, Ruby conformance section defines a set of rules, the implementers must respect. It defines rules for markup, DTD, document, module, generator, interpreter.

2.3 Normative (and non-normative) references

A specification is rarely written in isolation. It inherits from previously defined technologies and might set the future of other specifications by defining their base. Then it is essential to clearly defines what is the nature of the specifications (normative, informative), the technology refers to and the implications of these references for the future of the technology itself.

As a side note, there is also an interest to study and understand the conformance model of the technology which is developed in order to minimize the difficulties of other specifications using it in a conformant way.

2.3 Requirement A: Make a list of normative references.

What does it mean? A specification is rarely developed from scratch: it usually relies on other technologies defined in different specifications. The Working Group has to identify any specifications which defines the core technologies of the developed technology.

Why care? For the Working Group, it has an immediate benefit: “do not reinvent the wheel”. Using features which are already defined in other documents helps to minimize the size of the document which is developed and avoid too many ambiguities by rewriting the same concepts.

For the implementers, it has the huge benefits of knowing which part of the specification is based on another technology. It makes clear what are the implications for conformance. It may help them to minimize their work by using conformant libraries already implemented elsewhere.

For the users, it might help them to understand where the technology is coming from and therefore how to use it in combination with other technologies they might already know.

Techniques
Examples

Most W3C specifications contain a list of normative references, which are clearly identified at the end of the document.

2.3 Good Practice B: Do systematic reviews of normative references and their implications.

What does it mean? Each time, a normative reference is added to the specification, it has deep implications on the way the technology is defined. Each choice has to be reviewed and checked for the consequences in terms of time, consistency, precision, and use of the technology in specific conditions.

Why care? A specification defines a technology which will be used for a long time. The choice of precise and exact normative references is thus fundamental. Using a normative reference which evolves over time might endanger the specification or other specifications relying on it.

For the Working Group, reducing the degree of ambiguity or variation in the normative references minimizes or removes the possibility of misunderstanding. For implementers, it removes ambiguities and contradictions between different sets of technologies. It creates a stable environment into which they can make stable developments.

Techniques
Examples

For the sake of illustration, we give here a list of cases that illustrates some of the problems and their implications for the technology. It is not exhaustive review of all possible cases. Imagine, a technology has to use the notion of URI or URI-references. The technology is already defined in a specification which is called RFC2396 and has for title “Uniform Resource Identifiers (URI): Generic Syntax”.

Let's create a simple definition and give examples of possible problems that arise from this definition:

The value of the attribute is a URI as in [RFC2396]

which can be expressed by

...="http://www.example.org/#foo"
...="http://[3ffe:2a00:100:7031::1]/"
...="http://666.666.666.666/"
...="foo"
...="http://www.example.org/~anaïs-nin"

Precise designation and reference: The first example is illegal as the example uses a URI Reference as opposed to only a URI, RFC 2396 clearly distinguishes between those constructs. It would have been better to say:

The value of the attribute is a URI Reference as defined in section 4 of [RFC2396]

Superset of the reference and interpretation: RFC 2396 does not include support for IPv6 literals, the syntax has been introduced in RFC 2732 which does not update RFC 2396. It is not correct to assume that it does even if it seems logical. Do not interpret the intention of the external reference.

Contradictory choices and references: Using the concept of URI-reference as a normative reference and then in the prose of the specification, define that it is an error to use it.

3. Defining and using terminology

3.1 Define terms

3.1 Requirement A: Define the terms used in the normative parts of the specification.

What does it mean? The normative parts of a specification often uses technical terms in a very restricted sense; write down the definitions behind these terms. Use the same phrases to convey the same meaning: although repetition is often seen as a stylistic error in prose, in a technical specification, re-using the same phrases diminishes ambiguity, and lowers the threshold of vocabulary needed to understand the specification.

Why care? English (as any other natural languages) is ambiguous, such that a term used in a given context can be interpreted differently in a different context. Interoperability between implementations can only be achieved if implementers have the same understanding of the specification; defining the terms used in the normative parts promotes this common understanding which contributes to accurate implementation.

Also, once well-defined, the terms can be re-used in other specifications.

Techniques
  1. Review the conformance requirements/test assertions: the most important terms to define in the specification are usually easy to identify when reviewing conformance requirements or test assertions.
  2. Use the element dfn in HTML to indicate that this is the defining instance of the enclosed term. It will be easier to create a glossary of your terms later on. For example in this document
    <dfn>Conformance</dfn> is the fulfillment 
    of a product, process, or service of specified 
    requirements.
    
Examples

Cascading Style Sheets, level 2 (CSS2) Specification [CSS20]: The interoperability of the implementation of the CSS2 box model has been problematic, due to the lack of definition for when a property is set (see discussion on this topic on the www-style Mailing list in March 2001)

3.1 Requirement B: Create conformance labels for each part of the conformance model.

What does it mean? Many specifications define more than one type of conformance, where each type is applicable to a different class of product. For example, a language specification may define 2 conformance types – one for a parser and another for documents (i.e., content). Associate a well-defined label for each different type of conformance.

Why care? Having a label associated with each type of conformance helps interoperability, testing, and branding. It gives implementers a way to identify and discuss their implementations and express the degree to which an implementation has met a specific set of requirements in the conformance clause. It gives test developers a meaningful set of requirements to develop tests for and for which conformance claims can be made against. It gives users a way to articulate their buyer requirements by having a unique way to refer to conforming implementations.

Techniques
  1. Review all the different types of conformance in the specification (ideally, they should be listed in the conformance clause)
  2. Make sure they have an associated label and this label is clearly confined. Have a summary of the labels of conformance with the name and definition
Examples

XML 1.0 [XML10] defines a well-formed XML document, a valid XML document

WCAG 1.0 [WCAG10] defines a level A conformant document

SVG 1.1 [SVG11] defines “conforming SVG document fragments”, “conforming interpreters”, “conforming viewers”.

3.1 Good Practice C: Define the unfamiliar terms in-line, and consolidate the definitions in a glossary section.

What does it mean? Put the definition of any new term along with its first occurrence in the text, but make sure that all the definitions are also available from a central glossary section.

Why care? Having the definition in-line makes it easier to read the whole specification from top to bottom, while having a centralized section of defined terms makes it handy to look up a term when looking at a specific section, or for others to re-use the definitions.

Techniques
Examples

Thanks to XMLspec, XML Schema Part 1 [XML-SCHEMA-1]has both the in-line definition and the glossary

3.1 Good Practice D: Use terms already defined without changing their definition.

What does it mean? When a definition for a term already exists (e.g. in a different specification) and matches the specification needs, re-use the term and its definition without changing it, and provide a reference to the source.

Why care? Re-using existing terms reduces the cost of crafting new definitions and makes it easier for readers already familiar with other specifications to get into the new one. Also, conflicting definitions for the same term leads to reduced interoperability.

Techniques
  • Use the W3C Glossary [W3C-GLOSSARY] system to check if there are existing definitions of the given term
  • When quoting a definition from another specification, put a link back to the specification
Examples

QA Specification Guidelines reuses the terms defined globally in the QA Glossary [QA-GLOSSARY] and used by all documents of the QA Framework

3.2 What is mandatory

3.2 Requirement A: Use a consistent style for conformance requirements and explain how to distinguish them.

What does it mean? Different styles are used across specifications to convey conformance requirements: RFC 2119 [RFC2119] keywords, imperative voice, descriptive assertions, … Stick to one type of style, and tell the specification readers which style is used in the text.

Why care? It's important for specification readers to be able to differentiate requirements in the specification from non-requirements in order to either implement or review them.

Techniques
  • Using RFC 2119 [RFC2119] Keywords (MUST, SHOULD, MAY, ...) makes it easy to spot conformance requirements, due to their specific uppercase formatting; according to the RFC itself, they should be used only to establish interoperation [WIKI-RFC-KEYWORDS];

    A good conformance requirement using RFC Keyword is of the form: subject rfc_keyword operation, where subject is one of the classes of product, rfc_keyword one of MUST, SHOULD, MAY, and operation a verb describing one of the operations the classes of product can do (e.g. “send a message”, “process a request”)

  • The descriptive style takes a different approach: it describe the semantics of the language, rather than how it must be handled; the benefits of this approach is that it allows a wider reuse of the said semantics, but at the cost of not defining a common behavior between implementations, which may lead to interoperability issues (see also the wiki discussion on Meaning vs Behavior [WIKI-MEANING-BEHAVIOR]). Whatever the descriptive style you choose, stick to it.
  • The imperative style uses the imperative form to convey the requirement; it is often used in guidelines or specifications that needs readers involvement. Its weaknesses are that it doesn't necessarily make clear what needs to conform (since there is no subject), and the use of the imperative voice may make it harder to translate in some languages
  • avoid using language that looks normative (e.g. with RFC Keywords) in informative section

Using one of these styles doesn't preclude using another one in a different part of the specification as long as this is made very clear to the user. For instance, when defining a language, it is a good idea to define first its semantics using the descriptive style, and then the behavior of one (or more) type of implementations using RFC Keywords.

Examples

SVG 1.1 [SVG11] Recommendation, where the semantics are defined in descriptive style, and the implementations requirements with RFC Keywords in the SVG 1.1 Conformance section.

3.2 Requirement B: Indicate which conformance requirements are mandatory, which are recommended and which are optional.

What does it mean? Depending on the way conformance requirements are specified, it may or may not be clear if an implementation needs to implement all of them or only part of them. Try and make sure one can easily distinguish the type of requirements they have.

Why care? If implementers don't have the same understanding of what's required, interoperability is likely to suffer in the end.

Techniques
Examples

For instance, HTTP 1.1 [HTTP11] defines two types of conformance, one where all the MUST are respected, and one where all the MUST and the SHOULD are implemented.

4. Managing Variability

Specifications allow for variation between conforming implementations for different reasons, e.g., adaptation to hardware capacities and extensibility.  Variability, while it can provide for broader usage of the technology, may impede interoperability.  Watch out for excessive variability – that which goes beyond what is needed.  Look for a balance between what is needed to allow for flexibility while still achieving the desired interoperability.

This section gives advice on finding the right balance; the reader will also benefits from reading, Variability in Specifications [VIS] which goes into more details on the analysis of this variability.

4.1 Subdivide

Subdividing the technology should be done carefully.  Too many divisions complicates conformance and can hinder interoperability by increasing the chances of conflict with other aspects of the specification (e.g., other subdivisions).  Be smart when dividing the technology so that it is not excessive and provides a positive impact on implementation and interoperability.  The benefits of subdividing should outweigh the drawbacks.

   

Benefits: Subdividing can

  • make the technology easier to implement
  • facilitate incremental implementation
  • increase interoperability by focusing the technology on specific needs 
  • help organize the structure of the technology
  • provide better normative guidance than recommended or optional features in the "core" spec
  • provide names for feature bundles, facilitating automated negotiation between sending and receiving products

Drawbacks: Too many divisions can

  • complicate conformance – need to account for interrelationships with other subdivisions and variability (e.g., extensibility)
  • hurt interoperability – increases likelihood of incompatible implementations
  • increase misinterpretation or cause conflict of requirements due to multiple or duplicative requirements. 

4.1 Good Practice A: Create subdivisions of the technology when warranted.

What does it mean? It may make sense to subdivide the technology into related groups of functionality to target specific constituencies, address specific capabilities or hardware considerations, provide for incremental implementation, facilitate usability, etc.

Figure 3: One possible organization of Profiles, Modules and Levels

Graph illustrating one possible organization of profiles modules levels

  • Module A and Module B are core modules. They are mandatory for all implementations. We could say that define the first level of conformance which we might call Basic Conformance.
  • Module C and Module D are the set of modules that have to be implemented to reach the second level of conformance. The Level 2 includes Level 1.
  • Module E is an optional module of the technology.
  • Profile X defines an implementation of Level 2 (then Level 1 too) for a specific class of products for example.
  • Profile Z defines an implementation of Level 1 and an optional Module E.

Why care? For some specifications (e.g., huge, multi-disciplined), bundling functionality into named or anonymous packages can

  • provide an additional level of scoping control,
  • improve readability and the ability to find areas of interest, and
  • facilitate implementation and interoperability, since implementing the entire, monolithic specification may be impractical and undesirable
Techniques
  • Use profiles. Profiles are subsets of a technology tailored to meet specific functional requirements of application communities.  The specification may define individual profiles, and may also define rules for creating new profiles.  An individual profile defines the requirements for classes of products that conform to that profile.  Rules for profiles define validity criteria for profiles themselves.
  • Use functional levels (aka levels).   Functional levels are a hierarchy of nested subsets, ranging from minimal or core functionality to full functionality.  Levels are a good way to facilitate incremental development and implementation.  
  • Use modules.  Modules are discrete collections of semantically-related units of functionality that do not necessarily fit in a simple hierarchical structure.  Use modules when functionality can be implemented independently of one another  e.g., audio vs video module.  It is common to have implementers pick and choose multiple modules to implement.
Examples

Profile:  Mobile SVG Profiles: SVG Tiny and SVG Basic [SVG-TINY] is a profile aimed at mobile phones.

Profile: XHTML Modularization [XHTML-MOD] in section 3 and Synchronized Multimedia Integration Language (SMIL 2.0) Specification [SMIL20] specifications define rules for profiles.

  CSS and DOM technologies are examples where levels are the result of progressive historical development and technology enrichment and are realized in a series of specifications. 

Profile/Level combo: Mobile SVG Profile: SVG Tiny, Version 1.2 [SVG-MOBILE] define 3 profiles -  Tiny, Basic, Full  - which are nested, like levels, each targeted a specific hardware communities. 

Modules: XHTML Modularization [XHTML-MOD] and Synchronized Multimedia Integration Language (SMIL 2.0) Specification [SMIL20] gives good examples of modules usage for a technology.

4.1 Requirement B: If the technology is subdivided, then indicate which subdivisions are mandatory for conformance.

What does it mean? Regardless of the subdivision technique (i.e., profile, level or module), state whether one or more of the subdivisions is required for conformance.

Why care? Subdividing the technology affects and can complicate conformance with all the various combination of choices it provides.  Thinking about the various possibilities helps to structure the conformance model, taking into account how the subdivision can affect various classes of products.  Implementers as well as users need to know what is mandatory, optional, prohibited or conditional with respect to choosing what to implement and still be conforming.

Techniques

In the conformance clause, list the subdivisions that are mandatory for conformance. To help build this list, consider the following questions for each subdivision:

  1. Can an implementation conform without implementing the subdivision?
  2. Does the subdivision apply to specific classes of products and not to others?
  3. Is the subdivision dependent upon other subdivisions (that is, if it is implemented must others also be implemented)?
Examples

Content can be required to conform to one of the subdivisions (e.g., profiles)  or it may be conformant to the specification independently of a subdivision.  The question arises for a producer (of content): is it conforming if it generates content that is otherwise valid but does not conform to the subdivision.

WCAG 1.0 [WCAG10] defines three levels of Conformance depending on the levels.

XHTML Modularization [XHTML-MOD] defines minimal requirements for including certain basic modules when designing a conformant XHTML Mod document.

4.1 Requirement C: If the technology is subdivided, then address subdivision constraints.

What does it mean? This is a corollary to the Requirement above. Beyond being mandatory or not, subdivisions usually have conformance consequences due to minimal or new requirements, restrictions, interrelationships, and variability, etc.  As part of the conformance clause, describe the constraints associated with each subdivision

Why care? Creating subdivisions can get complicated, not just for the specification editor but for implementers who must pick and choose from the set of subdivisions.   Well designed subdivisions that convey the conditions, constraints, interrelationships, etc. can improve the clarity and understanding of the specification, conformance to the specification and facilitate implementation and interoperability.

Techniques

In the conformance clause, describe the conditions or constraints on subdivision usage.  To help accomplish this, model or graph the subdivisions indicating the following that applies:

  1. Atomicity of the subdivisions: Represent each subdivision showing its atomicity.
  2. Mandatory subdivisions: Label the subdivisions that are mandatory
  3. Minimal requirements: List minimal requirements for each subdivision.
  4. Dependencies among subdivisions: Show dependencies and interrelationships of the subdivisions. For example, modules that requires and builds on functionally related modules, i.e., modules that require modules from other functional areas.
  5. Conditions and constraints on subdivisions groups: Indicate conditions and constraints for combined occurrences of subdivision pairs or groups:
  6. Conditions or constraints associated with specific classes of products: Indicate which conditions and constraints are applicable to specific classes or products.
  7. Other conditions or constraints beyond these: Indicate any other conditions or constraints.
 
Examples

Synchronized Multimedia Integration Language (SMIL 2.0) Specification [SMIL20] has a SMIL 2.0 Language Profile for user agents (See section 13 [SMIL20]) but also provides a SMIL 2.0 Basic Profile for wireless and embedded devices (See section 14.3 in [SMIL20]). The SMIL 2.0 language Profile requires that a user agent implement the BasicAnimation module but not the SplineAnimation Module.  The SMIL 2.0 Basic Profile on the other hand does not require implementation of any of the animation modules.

Dependency or intertwined relationship between profiles and modules is common – The combination of XHTML 1.0 [XHTML10], SMIL 2.0 [SMIL20] and SVG 1.1 [SVG11] is an example.

4.1 Good Practice D: If the technology is profiled, define rules for creating new profiles.

What does it mean? If profiles are used and profiles can be developed outside the specification itself, then provide the rules for creating these derived profiles.  These profile rules provide instructions for building profiles (e.g., requirements on structure, functionality, encoding, etc.). Derived profiles should not contradict predefined profiles, if there are any in the base specification.

Why care? Well-defined rules facilitate the creation of derived profiles that are well-specified, implementable, testable, and can foster a better interoperability across profiles.  If these rules are defined and followed, then the derived profile conform to the specification.

Techniques
  1. Create two particular profiles
  2. Identify the common requirements in these two profiles
  3. Identify the rules that you have followed to create these profiles and write them down
  4. Try to create a third profile using the defined rules
Examples

WebCGM 1.0 [WEBCGM10] defines rules to create Profiles (See section 1.2 in [WEBCGM10])

4.2 Optionality and Options

Options in specifications provide implementers the freedom to make choices about

These choices also called discretionary items, give implementers of the technology the opportunity to decide from alternatives when building their applications and tools.They describe or allow optionality of behavior, functionality, parameter values, error handling, etc. They may be considered necessary because of environmental conditions (e.g., hardware limitations or software configuration), locality differences (e.g., language or time zones), dependencies on other technologies, or the need for flexibility.

Although there are perceived benefits to providing optional features, there is also a downside: optional features increase the variations that can exist among implementations. The greatest way to undo the utility of a specification is with too many optional features. Basically, different implementations may use different combinations of optional features. This makes comparisons between implementations difficult as well as complicates conformance testing and increases the chance of non-interoperable implementations.

A concise XSLT 1.0 [XSLT10] example: implementers have been granted separate discretion about all of the following aspects of creating attributes in the output:

  1. Whether to raise an error when the supplied name is not a valid QName
  2. Whether to raise an error when an attempt is made to create an attribute after children of the element have been created
  3. Whether to raise an error when an attempt is made to create an attribute on a node that is not an element
  4. Whether to raise an error when the content of an attribute is not plain text
  5. Whether to raise an error when two attribute-sets of the same precedence contain an attribute of the same name
  6. Whether to raise an error when attempting to create an attribute directly under the root of a result tree fragment

In each case, there is one prescribed behavior for an implementation that chooses not to raise an error. Thus, the 6 separate binary choices give rise to 64 different possible behaviors for conformant processors. Typically, an implementer would be content to make a more global choice about raising errors when there is an attempt to create non-well-formed XML results.

4.2 Good Practice A: Make sure there is a need for the optional feature.

What does it mean? Examine the reason for the optional feature - is it to address a real, existing need? Should it really be optional or made a mandatory part of the specification? Be careful not to provide optional features in anticipation for something that sounds like a good idea but will probably never be realized - ask the implementers if they ever plan to need this. Think about the implications of both implementing the optional feature and of not implementing it. Don't make something an option just because the Working Group can't decide on what to do or can't reach consensus. As the specification progresses, if the feature is not implemented, consider removing it.

Why care? A concise list of optional features helps to keep the specification focused and greatly increases the likelihood of obtaining interoperable solutions. Ensuring that only necessary optional features are contained in the specification also makes the job of the implementer easier and reduces costs.

Techniques

As part of its exit criteria for Candidate Recommendation, a Working Group created a set of tests to 'test the specification'. The tests were able to show where there was need for optionality (e.g., diversity among implementations and flexibility justified) and where it was possible to narrow the choices (e.g., implementations used a much narrower set of values than what was permitted).

4.2 Good Practice B: Clearly identify optional features.

What does it mean? When introducing an optional feature in the specification, label it as such, so that it's easy to find all the optional features defined in the specification.

Why care? Options can be useful, but non-judicious use of optional features increases the variability among conforming implementations. In order to minimize the unnecessary optionality, it is a good idea to provide an easy way to identify them. The use of labels for optional features also helps in constructing pro forma, conformance claims, comparisons between two implementations, reports to the W3C Director about implementations, etc.

Techniques

Options can be tagged in many ways. Any technique that distinguishes the optional feature from the required feature is acceptable. Some possibilities include:

4.2 Good Practice C: Indicate any limitations or constraints on optional features.

What does it mean? Provide as much information as possible to narrow the allowable choices and to increase predictability. For implementation dependent values or features, if possible, provide a range or set of permitted values rather than leaving it completely open. Design the extension mechanism to allow for the creation of extensions that do not interfere with conformance to the original specification.

Discuss the implications of either using the optional feature or not. It may be helpful to provide rationale for choosing one option over another or for not using the option at all. Consider the unintended consequence of the optional feature - on other optional features, other parts of the specification, on other specifications.

Why care? Narrowing choices and increasing predictability enhance the likelihood of interoperability since the sample space for the implementer to choose from is diminished. Narrow choices and providing more information also increases the chances of correct implementations since incorrect choices are eliminated. An enumerated list of values is one way to constrain the choice of optionality.

Techniques

For optional features, especially enumerated lists, make sure that the number of choices/options that can be implemented is known. Specifically, can zero, exactly one, or several of the allowable choices be implemented? Does this number depend on other parts of the specification or other chosen options?

Questions to consider include:

Examples

In XPath 2.0 [XPATH20] and its associated functions, the Working Group intends to require support for collation by Unicode code-point, and allow implementations to implement as many other collations as they wish.

4.3 Extensibility and Extensions

To accommodate changes in technology and information on the Web, a specification can be designed for extensibility. A specification is extensible when it provides a mechanism to allow an external party to create extensions. Extensions incorporate additional features beyond what is defined in the specification. However, extensions can compromise interoperability if there are too many differences between implementations. The impact of extensions can be mitigated through features specifically designed to allow new functionality. These features provide a 'standard way to be non-standard' by including hooks, conformance rules, or other mechanisms by which new functionality may be added in a conforming way, designated as extensibility mechanism.

4.3 Requirement A: Address Extensibility.

What does it mean? Extensions might be encouraged or discouraged by the Working Group. There is a benefit to addressing the value or danger of extensibility for the technology being developed. Formalizing the position of the Working Group by a clear defined section and prose removes ambiguities for the specification users about the possibility of developing extension or not.

Why care? There is a strong likelihood that implementers will want to extend the functionalities defined in the specification, because they have specific needs which are not covered by it. Defining clearly how these extended functionalities can be hooked in conformance implementations help ensure that extensions are defined in a consistent manner leading to predictable handling of extensions and minimize issues such as interoperability problems, minimal support, and harmonious future development.

The Working Group may consider that the technology is complete, self-sufficient and and doesn't need to be extensible. In this case, it is necessary to write this clearly in the specification and to explain why the technology is not considered extensible. It might be just for the social benefit of the community to ensure a maximum interoperability.

Techniques
  1. Create a section in the specification dedicated to extensibility
  2. Call it Extensions
  3. Make a table of contents entry for it
  4. Address the following good practices of this section
Examples

The specification CSS3 module: Syntax [CSS3-SYNTAX] has addressed the topic of extensions for CSS 3. It is clearly identified in the table of contents and there's a specific section for it.

4.3 Good Practice B: If extensibility is allowed, define an extension mechanism.

What does it mean? Extensions increase variability between implementations. Defining a mechanism helps to ensure extensions are defined in a consistent manner leading to predictable handling of extensions, including the ability to take appropriate actions (e.g., do the extension, ignore, or take a fall-back behavior).

Why care? By planning for extensions and designing a specification for extensibility, there is less chance that extensions will interfere with conformance to the base specification and a better chance at achieving interoperability. Conversely, there may be areas in a specification that would not benefit from extensibility and extensions are strictly forbidden (e.g., permissible characters in XML 1.0 names for elements and attributes, most of the built-in datatypes in Schema Part 2). This is called strict conformance. Strict conformance is defined as conformance of an implementation that employs only the requirements and/or functionality defined in the specification and no more.

Reasons for designing extensibility into a specification include:

  • providing a stable, useful framework to manage the rapid pace of technology change,
  • reducing the chances that extensions will interfere with conformance and increasing the chances for achieving interoperability,
  • providing the ability to 'test-drive' new functionality that may migrate into future specifications,
  • enabling implementers to include functionality that they consider to be required by their customers.
Techniques

Technology and application needs dictate the best strategy for enabling extensibility.

When designing for extensibility, it can get complicated. Points to consider that can impact design decisions include, but are definitely not limited to:

  • Address the use of extension in the conformance section.
  • Give a well defined template to create extension.
  • Verify that this mechanism prevents the creation of extension conflicting with the semantics of the specification.
  • When needed, define the scope of extensions. (e.g., Are extensions authorized only for certain parts of the technology?).
  • As an example, create a fake extension as an example for implementers what would be the right way to do it
  • Indicate if extensions interact with other extensions.
  • Indicate if extensions can be combined or are mutually exclusive.
  • Indicate if extensions apply to a specification's profiles or modules and not the core part of the specification.
Examples
Mechanism defined within the specification, extension indicator, error handling instructions

XSLT 1.0 [XSLT10] provides extension mechanisms that allow an XSLT style sheet to determine whether the XSLT processor by which it is being processed:

  • has implementations of particular extensions available,
  • and to specify what should happen if those extensions are not available.

It defines two boolean functions: function-available (QName) and element-available (QName) that must be present in every implementation. These functions inform the XSLT processor that there is an extension, therefore the XSLT processor can return a value of false and provides handling instructions (e.g., signal an error, perform fallback and not signal error), if the extension is not available.

WSDL 2.0 [WSDL20] defines binding extension elements which are used to provide information specific to a particular binding. It is a two-part extensibility model based on namespace-qualified elements and attributes. It provides the syntax and semantics for signaling extensions. Extension elements can be marked as mandatory, meaning that they MUST be processed correctly by the WSDL processor - i.e., either agree to fully abide by all the rules and semantics signaled by the extension or immediate cease processing (fault).

Mechanism based on another specification's extension mechanism

CC/PP exchange protocol based on HTTP Extension Framework [CCPP-EXCHANGE] defines a HTTP extension to exchange CC/PP descriptions effectively. The CC/PP exchange protocol conforms to HTTP/1.1 and is a generic extension mechanism for HTTP 1.1 [HTTP11] designed to inter-operate with existing HTTP applications. The CC/PP exchange protocol uses an extension declaration to indicate that an extension has been applied to a message and possibly to reserve a part of the header namespace. It provides rules for which of the HTTP Extension Framework [HTTP-EXTENSION] extension declaration strengths and extension declaration scopes to use and defines the syntax and semantics of the header fields.

OWL Reference [OWL-REF] is a vocabulary extension of RDF Semantics (See section 6 in [RDF-MT]). OWL imposes additional semantic conditions on RDF called semantic extensions of RDF. These semantic extensions conform to the semantic conditions for simple interpretations described in the RDF Semantics Recommendation. The OWL semantics is consistent with RDF semantics, but OWL when understood as RDF is 'incomplete' versus the same OWL when understood as OWL. Thus, by understanding OWL more is learned and nothing that is learned contradicts what is learnt by RDF alone.

4.3 Good Practice C: Warn implementers to create extensions that do not interfere with conformance.

What does it mean? Include in the specification a warning to those who are creating extensions that extensions should not contradict or negate conformance to the original specification.

Why care? This is probably obvious, but sometimes it makes sense to reinforce an important point. The intent is to uphold conformance regardless of whether there is an extension or not – if it conformed without the extension, then conformance should hold true with the extension.

Techniques

Include statements in the specification such as:

Examples

In XSLT 1.0 [XSLT10], extension attributes (from other namespaces) can be present on the official XSLT elements, but they are prohibited from changing the specified behavior within the detectability of conforming behavior. Thus, an extension attribute can cause the element to perform faster but cannot change the result.

CSS3 module: Syntax [CSS3-SYNTAX] defines an extension mechanism which uses a not valid start character for identifiers in CSS, so it is guaranteed never to be used by any current or future level of CSS. CSS-conforming parsers will skip rules that contain identifiers with such a character. Therefore it is not authorized to redefine the properties defined in the specification.

4.3 Good Practice D: Define error handling for unknown extensions.

What does it mean? Include error handling instructions for when an extension is not available or understood.

Why care? When using a strict conforming application, users might have to deal with documents, data which are considered invalid because they are containing errors, or they are extended. Developers need to know what is the expected the behavior of the application in such context.

Techniques

There are typically two approaches: (see section 4.2.3 Extensibility from Architecture of the World Wide Web, First Edition [WEB-ARCH])

A good way to handle these two approaches is to have a way in the syntax to distinguish which behavior is expected, e.g., mustUnderstand attribute in Soap 1.2

Don't forget to address all the classes of products. For example, an authoring tool and a rendering tool might have to behave in a different way or not.

Examples

Ruby Annotation [RUBY] Specification defines what parts must be ignored and displayed (See section 1.2.2 in [RUBY]) when an unknown element is met.

HTML 4.01 [HTML401] defines the behavior of user agents with regards to invalid documents (See section B.1 [HTML401])

4.4 Deprecation

The need for deprecation comes about when there are features (e.g., function argument, element, attribute) defined in the specification that have become outdated and are being phased out, usually in favor of a specified replacement. It may mean for instance that the feature is still there and functional, but

  1. there is a better way of achieving the same thing and the Working Group prefers this better way is used
  2. or the feature is not being used and the Working Group wants to clean up the specification and eventually remove the feature.

From a user point of view, a deprecated feature is one that should not be used anymore, since it may be removed from future versions of the specification. Deprecated features are no longer recommended for use and may become obsolete and no longer defined in future versions of the specification.

4.4 Requirement A: Identify deprecated features.

What does it mean? When a technology evolves, it is important to provide a list of the features being deprecated from the previous version of the specification.

Why care? It helps implementers know which features are expected to be obsoleted in the next version of the technology. This gives them the opportunity to adjust their implementation to phase out the relevant features, and provide new ways to accomplish the same task.

Techniques
  1. Create a list of all deprecated features
  2. Create a dedicated section for it
  3. Create a entry in the table of content going to this list
  4. For each deprecated feature, create a link to the appropriate definition in the specification
Examples

HTML 4.01 [HTML401]: The specification has a full list of elements and attributes. The deprecation status is given in the two lists. There is an entry in the table of content to these two lists. Each element/attribute is linked to its definition in the specification

Namespaces in XML 1.1 [NAMESPACES11], Section 2.2.2 Use of IRIs as Namespace Names discusses the deprecation of relative IRI references, although the information is difficult to find.

4.4 Requirement B: Define how deprecated feature is handled by each class of product.

What does it mean? By deprecating a feature, the Working Group indicates its desire that the feature disappear from a future version of the specification. The motivation may be to convert an old feature to a newer one or to remove an old, dangerous, redundant or undesirable feature. Regardless of the reason, it is important to define the affect this has on implementations that may encounter this feature (e.g., consumer products such as user agents or producer products such as authoring tools). Will use of the deprecated feature be tolerated? Will it signal an error or a warning? Typically, it is expected that a deprecated feature would not affect a consumer (e.g. user agent), while a producer (e.g. authoring tool) should issue a warning.

Why care? Defining how deprecated features are handled provides a smoother transition for the users of the specified technology, and ensure more consistency of the behavior across implementations. It is also particularly important for implementations that needs to support different versions of the specification.

For instance, the specification may require that an implementation supports both the features of the new and the old specifications, or suggest a converting mechanism.

Techniques
  1. Consider the effect of deprecation on all classes of products that implement the specification (e.g., authoring tools, converter, user agents).
  2. Define how it affects conformance
Examples

In Mathematical Markup Language (MathML) Version 2.0 (Second Edition) [MATHML20], MathML2.0 section 7.2.1.2 describes deprecated MathML 1.x features in terms of MathML-output-conformant authoring tools, MathML-input-conformant rendering/reading tools, and MathML-roundtrip-conformant processors.

HTML 4.01 [HTML401]: In the conformance section of HTML 4.01, there is the definition of deprecation and what user agents should do. The behavior for other kind of products is not defined though.

User agents should continue to support deprecated elements for reasons of backward compatibility.

4.4 Good Practice C: Explain how to avoid using a deprecated feature.

What does it mean? Deprecating a features implies that its use is discouraged, often because there is a better technique available to achieve the same result. For each deprecated feature, it is necessary to explain how implementers and users can avoid using it. It might be helpful to give additional information providing insight into the deprecation motivation.

Why care? Examples and information about each deprecated features help users to smoothly evolve toward the new version of the technology, understanding its benefits. This enables a faster adoption of the technology.

It helps implementers understand the rationale for implementing the new technology, to implement an alternative mechanism, and to tool tips or conversion scenarios to help users with the transition.

Techniques
  1. For each deprecated feature, give one or more examples showing the old way and the new way.
Examples

Namespaces XML 1.1 [NAMESPACES11] deprecation of IRI references includes a link to the deprecation ballot results, providing background information on the proposal to deprecate, what this means with respect to conformance to XML 1.0 and Namespaces as well as the affect on other specifications (i.e., DOM, XPath).

HTML 4.01 [HTML401] gives numerous examples on how to avoid the markup which was used in previous versions for deprecated elements.

4.4 Good Practice D: Identify obsolete features.

What does it mean? A feature which has been deprecated in a previous version of the specification was at risk of being removed. Making it obsolete indicates that the feature is no longer in use and removed from the current version of the technology. Providing a list of obsolete features informs implementers and users what is no longer in the specification.

Why care? It gives a clear message to users and implementers that obsolete features are forbidden and not part of the specification anymore. It helps avoid the creation of documents mixing old and new techniques which would be invalid.

It helps avoid name clashing. When an extension to a technology is created, implementers are likely to use syntax token for their extended features name. Giving the name of obsolete features helps implementers to avoid using the names of previous features which are now obsolete.

Techniques
  1. Create a list of all features that are obsolete.
  2. Create a dedicated section for it.
  3. Create a entry in the table of content going to this list.
  4. For each deprecated feature, create a link to the appropriate definition in the previous specification.
Examples

HTML 4.01 [HTML401]: The specification has a full list of elements and attributes. The obsolete status is given in the two lists. There is an entry in the table of content to these two lists. Each element/attribute is linked to its definition in the specification

HTML 4.01, Appendix A: Changes lists the elements that are obsolete and suggests an alternative element for use. The following elements are obsolete: LISTING, PLAINTEXT, and XMP. For all of them, authors should use the PRE element instead.

4.5 Error Handling

4.5 Good Practice A: Define an error handling mechanism.

What does it mean? For a language, address what effect an error (be it syntactic or semantic) in the input has to a processor of this language. For a protocol, address how should behave a party to this protocol when a bogus message is received.

Why care? There are many reasons a system may fail; to make a technology reliable, it is crucial to define how it should react to bogus input. Defining error handling also makes it possible for a user of the technology to react appropriately to the error condition.

Techniques

Different methodologies exist to handle er