W3C

W3C Wicked Cool Stuff Specification

An awesome example of 'wicked-coolness'

W3C Editor's Draft 06 April 2010

This Version:
http://dev.w3.org/2009/dap/respec/test-spec/
Latest Published Version:
http://www.w3.org/TR/wicked-cool/
Latest Editor's Draft:
http://dev.w3.org/2009/dap/respec/test-spec/
Previous version:
http://www.w3.org/TR/2009/WD-wicked-cool-20090315/
Editors:
Robin Berjon, Robineko
Batman, Outsiders

Please refer to the errata for this document, which may include some normative corrections.

This document is also available in these non-normative formats: Some Format, Some Other Format, and Canonical Format.


Abstract

This is an example specification used to test, develop, and document the ReSpec.js specification publishing system. This really isn't so much a specification as a playground in more ways than one.

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 was published by the Device APIs and Policy Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-device-apis@w3.org (subscribe, archives). All feedback is welcome.

Publication as a Editor's 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.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1. RFC 2119 is not optional

There are several RFC 2119 keywords: must, must not, required, shall, shall not, should, should not, recommended, may, and optional. They are only recognised in uppercase, so that one may still write normally if one must. Importantly, the must not fail when happening over line breaks, but:

2. Small Talk about Abbreviations

W3C is no different from other geek outfits, and is therefore full of abbreviations. We don't care about the silly debate going on about abbr and acronym, we just support whatever people use, so that the following all ought to work:

3. A Defining Moment

A definition is an element that marks out a term that is defined in the current block.

They can sometimes be definitions with a title so that they can be written in the flow of the sentence without disruption.

Sometimes you will see an AbbrDef, which is an abbreviation-based definition.

One thing that should definitely work is creating definitions over multiple lines in the source.

It is then possible to reuse them. The title trick works both ways so that definitions can be reused fluidly. It would be possible to automatically detect them but for the time being they require an a element.

This should have no problem mixing up with abbr as AbbrDef shows, and a definition with a title works over several lines, just like definitions over multiple lines.

4. The Dahut interface

This is a simple example of the way in which Web IDL [WEBIDL] interfaces are created. This one is for the Dahut interface.

[Constructor]
interface Dahut : Mammal, Cryptoid {
    readonly attribute DOMString     chirality;
             attribute unsigned long age;
    Dahut         turnAround (in float angle, in boolean fall);
    unsigned long trip ();
    void          yell ([AllowAny] in unsigned long volume, [TreatNullAs=EmptyString] in DOMString sentence);
};

4.1 Attributes

age of type unsigned long
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
No exceptions.
chirality of type DOMString, readonly
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
No exceptions.

4.2 Methods

trip
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
No parameters.
No exceptions.
Return type: unsigned long
turnAround
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
ParameterTypeNullableOptionalDescription
anglefloat
fallboolean
No exceptions.
Return type: Dahut
yell
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
ParameterTypeNullableOptionalDescription
volumeunsigned long
sentenceDOMString
No exceptions.
Return type: void

5. A Good Reference

One can trivially make references to any specification, say for instance [WIDGETS], [WICD], and even in a normative way [REX] or [SVGMOBILE12]. It's all about I18N, [ZHMARK].

6. Russian Turtles

This section has an h2 title in the original source.

6.1 Russian Turtles

This section has an h2 title in the original source.

6.1.1 Russian Turtles

This section has an h2 title in the original source.

6.1.1.1 Russian Turtles

This section has an h2 title in the original source.

6.1.1.1.1 Russian Turtles

This section has an h2 title in the original source.

6.1.1.1.1.1 Russian Turtles

This section has an h2 title in the original source.

7. Including other data

Including other data is easy! This sentence came from an external file.

The example below is from an external file:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    elementFormDefault="qualified" 
>
  <xs:attribute name="data-include" type="xs:string"/>
  <xs:attribute name="data-oninclude" type="xs:ID"/>

</xs:schema>

8. Transforming content

Transforming content is also easy! this text is hilighted by being wrapped in an 'em'.

A. Acknowledgements

Many thanks to Marcos Cáceres for moral support, and to Bert Bos and Geoffrey Sneddon for their tools from which I pilfered joyfully.

B. References

B.1 Normative references

[REX]
Robin Berjon. Remote Events for XML (REX) 1.0. 13 October 2006. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2006/WD-rex-20061013
[SVGMOBILE12]
Chris Lilley; et al. Scalable Vector Graphics (SVG) Tiny 1.2 Specification. 10 August 2006. W3C Candidate Recommendation. (Work in progress.) URL: http://www.w3.org/TR/2006/CR-SVGMobile12-20060810

B.2 Informative references

[WEBIDL]
Cameron McCormack. Web IDL. 19 December 2008. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2008/WD-WebIDL-20081219
[WICD]
Daniel Appelquist; et al. WICD Core 1.0. 18 July 2007. W3C Candidate Recommendation. (Work in progress.) URL: http://www.w3.org/TR/2007/CR-WICD-20070718
[WIDGETS]
Marcos Caceres. Widget Packaging and Configuration. 01 December 2009. W3C Candidate Recommendation. (Work in progress.) URL: http://www.w3.org/TR/2009/CR-widgets-20091201/
[ZHMARK]
标点符号用法 (Punctuation Mark Usage). 1995. 中华人民共和国国家标准