schema location: | cleanCode.xsd |
targetNamespace: | cleancode.com |
Elements | Complex types | Simple types |
body | Flow | NonEmptyString |
callout | ShortString | |
cleanCodeDoc | ||
codeBlock | ||
example | ||
files | ||
head | ||
incident | ||
product-summary |
diagram | |||||||||||||||||||||||||
namespace | cleancode.com | ||||||||||||||||||||||||
type | extension of Flow | ||||||||||||||||||||||||
properties |
|
||||||||||||||||||||||||
children | xhtml:form example callout codeBlock incident product-summary files | ||||||||||||||||||||||||
used by |
|
||||||||||||||||||||||||
attributes |
|
||||||||||||||||||||||||
annotation |
|
||||||||||||||||||||||||
source | <xs:element name="body"> <xs:annotation> <xs:documentation>Corresponds to html 'body'</xs:documentation> </xs:annotation> <xs:complexType mixed="true"> <xs:complexContent mixed="true"> <xs:extension base="Flow"> <xs:attributeGroup ref="xhtml:attrs"/> <xs:attribute name="onload" type="xhtml:Script"/> <xs:attribute name="onunload" type="xhtml:Script"/> <xs:attribute name="background" type="xhtml:URI"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> |
example output | |||||||||||||||||||||||||
example input |
<cc:callout caption="variable declarations" pre="true">
my $stuff; <b># perl</b>
$stuff = 25.3;
$stuff = "abc";
var stuff; <b>// javascript</b>
stuff = 25.3;
stuff = "abc";
double stuff; <b>// java</b>
stuff = 25.3;
// stuff = "abc"; // illegal
</cc:callout>
|
||||||||||||||||||||||||
example output | |||||||||||||||||||||||||
example input |
<cc:callout caption="Perl initialization"> (no "pre" attribute here)
<pre>
my $x; # declaration
print "x = $x\n";
</pre>
<div class="either">Results in:</div>
Use of uninitialized value
</cc:callout>
|
||||||||||||||||||||||||
diagram | |||||||||||||||||||||||||
namespace | cleancode.com | ||||||||||||||||||||||||
type | extension of xhtml:Flow | ||||||||||||||||||||||||
properties |
|
||||||||||||||||||||||||
used by |
|
||||||||||||||||||||||||
attributes |
|
||||||||||||||||||||||||
annotation |
|
||||||||||||||||||||||||
source | <xs:element name="callout"> <xs:annotation> <xs:documentation>Callout which flows around the main text</xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="xhtml:Flow"> <xs:attribute name="caption" type="xs:string" use="required"/> <xs:attribute name="width" type="xs:string" use="optional"/> <xs:attribute name="pre" type="xs:boolean" use="optional" fixed="true"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> |
diagram | |||
namespace | cleancode.com | ||
properties |
|
||
children | head body | ||
annotation |
|
||
source | <xs:element name="cleanCodeDoc"> <xs:annotation> <xs:documentation>Root for CleanCode document</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element ref="head"/> <xs:element ref="body"/> </xs:sequence> </xs:complexType> </xs:element> |
example output | |||
example input |
<cc:codeBlock> package com.cleancode.util; public class Utilities { <b>public</b> static String myStuff = "xyz"; . . . } </cc:codeBlock> |
||
diagram | |||
namespace | cleancode.com | ||
type | extension of xhtml:Flow | ||
properties |
|
||
used by |
|
||
annotation |
|
||
source | <xs:element name="codeBlock"> <xs:annotation> <xs:documentation>Separate code block without wrap.</xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="xhtml:Flow"/> </xs:complexContent> </xs:complexType> </xs:element> |
example output | |||||||||||||
example input |
<cc:example language="Java, JavaScript"> (Two choices, no explicit captions)
<cc:exampleBlock>
<pre>
print(string1); print(string2); print(string3);
</pre>
</cc:exampleBlock>
<cc:exampleBlock>
<pre>
print(string1 + string2 + string3);
</pre>
</cc:exampleBlock>
</cc:example>
|
||||||||||||
example output | |||||||||||||
example input |
<cc:example language="Java, JavaScript"> (One choice, with explicit caption)
<cc:exampleBlock caption="Misleading Code">
<pre>
if (cond1)
statement1a;
statement1b;
else if (cond2)
statement2a;
statement2b;
</pre>
</cc:exampleBlock>
</cc:example>
|
||||||||||||
example output | |||||||||||||
example input |
<cc:example language="Any"> (Multiple choices, no explicit captions)
<cc:exampleBlock>If A and B...</cc:exampleBlock>
<cc:exampleBlock>If A and not B...</cc:exampleBlock>
<cc:exampleBlock>If not A and not B...</cc:exampleBlock>
<cc:exampleBlock>If not A and B...</cc:exampleBlock>
<cc:exampleBlock>If A and B but not C...</cc:exampleBlock>
<cc:exampleBlock>If not A nor B but C...</cc:exampleBlock>
</cc:example>
|
||||||||||||
diagram | |||||||||||||
namespace | cleancode.com | ||||||||||||
properties |
|
||||||||||||
children | exampleBlock | ||||||||||||
used by |
|
||||||||||||
attributes |
|
||||||||||||
annotation |
|
||||||||||||
source | <xs:element name="example"> <xs:annotation> <xs:documentation>Block-level example text</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="exampleBlock" maxOccurs="unbounded"> <xs:complexType> <xs:group ref="xhtml:block"/> <xs:attribute name="caption" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="language" type="xs:string" use="required"/> </xs:complexType> </xs:element> |
diagram | |||||||||||||
namespace | cleancode.com | ||||||||||||
properties |
|
||||||||||||
children | file | ||||||||||||
used by |
|
||||||||||||
attributes |
|
||||||||||||
annotation |
|
||||||||||||
source | <xs:element name="files"> <xs:annotation> <xs:documentation>Collection of files for table of contents</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="file" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="relfile" type="NonEmptyString"/> <xs:element name="absfile" type="NonEmptyString"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="group" type="xs:string" use="optional"/> </xs:complexType> </xs:element> |
diagram | |||||
namespace | cleancode.com | ||||
properties |
|
||||
children | relfile absfile | ||||
source | <xs:element name="file" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="relfile" type="NonEmptyString"/> <xs:element name="absfile" type="NonEmptyString"/> </xs:sequence> </xs:complexType> </xs:element> |
diagram | |||||
namespace | cleancode.com | ||||
type | NonEmptyString | ||||
properties |
|
||||
facets |
|
||||
source | <xs:element name="relfile" type="NonEmptyString"/> |
diagram | |||||
namespace | cleancode.com | ||||
type | NonEmptyString | ||||
properties |
|
||||
facets |
|
||||
source | <xs:element name="absfile" type="NonEmptyString"/> |
diagram | |||
namespace | cleancode.com | ||
properties |
|
||
children | title group id version xhtml:meta | ||
used by |
|
||
annotation |
|
||
source | <xs:element name="head"> <xs:annotation> <xs:documentation>Corresponds to html 'head'</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="title" type="NonEmptyString"> <xs:annotation> <xs:documentation>populates html:title element</xs:documentation> </xs:annotation> </xs:element> <xs:element name="group" type="NonEmptyString" minOccurs="0"> <xs:annotation> <xs:documentation>reference to files/@group in contents template</xs:documentation> </xs:annotation> </xs:element> <xs:element name="id" type="NonEmptyString" minOccurs="0"/> <xs:element name="version" type="NonEmptyString" minOccurs="0"/> <xs:element ref="xhtml:meta" minOccurs="0" maxOccurs="unbounded"/> <!--<xs:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>--> </xs:sequence> </xs:complexType> </xs:element> |
diagram | |||||
namespace | cleancode.com | ||||
type | NonEmptyString | ||||
properties |
|
||||
facets |
|
||||
annotation |
|
||||
source | <xs:element name="title" type="NonEmptyString"> <xs:annotation> <xs:documentation>populates html:title element</xs:documentation> </xs:annotation> </xs:element> |
diagram | |||||
namespace | cleancode.com | ||||
type | NonEmptyString | ||||
properties |
|
||||
facets |
|
||||
annotation |
|
||||
source | <xs:element name="group" type="NonEmptyString" minOccurs="0"> <xs:annotation> <xs:documentation>reference to files/@group in contents template</xs:documentation> </xs:annotation> </xs:element> |
diagram | |||||
namespace | cleancode.com | ||||
type | NonEmptyString | ||||
properties |
|
||||
facets |
|
||||
source | <xs:element name="id" type="NonEmptyString" minOccurs="0"/> |
diagram | |||||
namespace | cleancode.com | ||||
type | NonEmptyString | ||||
properties |
|
||||
facets |
|
||||
source | <xs:element name="version" type="NonEmptyString" minOccurs="0"/> |
example output | |||||||||||||
example input |
<cc:incident name="Zip Disk"> <cc:specs> <cc:category>hardware</cc:category> <cc:date>2002.01.15</cc:date> <cc:company>Iomega</cc:company> <cc:product>Zip Drive</cc:product> <cc:pversion>100MB USB</cc:pversion> <cc:os>Win98</cc:os> </cc:specs> <cc:background> <p> Iomega manufactures portable storage devices which connect to PCs and Macintoshs. </p> </cc:background> <cc:scenario> <p> I am a regular PC user exclusively. A couple years back, I was a regular Mac user, and my Mac had a dual personality of a PC as well (very spiffy). ... </p> </cc:scenario> <cc:issues> <ul> <li> The big one is interoperability. Iomega makes the drive hardware, the disk media, and the software... so why can't I read a Mac disk on my PC? ... </li> </ul> </cc:issues> <cc:nutshell> <p> A good product; it's been around long enough to prove its usefulness and staying power. </p> </cc:nutshell> </cc:incident> |
||||||||||||
diagram | |||||||||||||
namespace | cleancode.com | ||||||||||||
properties |
|
||||||||||||
children | specs background scenario issues nutshell | ||||||||||||
used by |
|
||||||||||||
attributes |
|
||||||||||||
annotation |
|
||||||||||||
source | <xs:element name="incident"> <xs:annotation> <xs:documentation>Software or website incident description</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="specs"> <xs:complexType> <xs:sequence> <xs:sequence> <xs:element name="category" type="xhtml:Inline"/> <xs:element name="date" type="xhtml:Inline"/> <xs:element name="company" type="xhtml:Inline"/> </xs:sequence> <xs:choice> <xs:sequence> <xs:annotation> <xs:documentation>software</xs:documentation> </xs:annotation> <xs:element name="product" type="xhtml:Inline"/> <xs:element name="pversion" type="xhtml:Inline"/> <xs:element name="os" type="xhtml:Inline"/> </xs:sequence> <xs:sequence> <xs:annotation> <xs:documentation>web page</xs:documentation> </xs:annotation> <xs:element name="section" type="xhtml:Inline"/> <xs:element name="os" type="xhtml:Inline"/> <xs:element name="browser" type="xhtml:Inline"/> <xs:element name="url" type="xhtml:Inline"/> <xs:element name="homepage" type="xhtml:Inline"/> </xs:sequence> <xs:element name="item" type="xhtml:Inline"> <xs:annotation> <xs:documentation>non-software/web page</xs:documentation> </xs:annotation> </xs:element> </xs:choice> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="background" type="Flow"/> <xs:element name="scenario" type="Flow"/> <xs:element name="issues" type="Flow"/> <xs:element name="nutshell" type="Flow"/> </xs:sequence> <xs:attribute name="name" type="ShortString" use="required"/> </xs:complexType> </xs:element> |
example output | |||||
example input |
<cc:specs> <cc:category>software</cc:category> <cc:date>2002.11.11</cc:date> <cc:company>Lotus</cc:company> <cc:product>Lotus 1-2-3</cc:product> (unique elements for each example hilighted) <cc:pversion>9.5</cc:pversion> <cc:os>WinXP</cc:os> </cc:specs> |
||||
example output | |||||
example input |
<cc:specs>
<cc:category>communication</cc:category>
<cc:date>2002.01.25</cc:date>
<cc:company>Alaska Air</cc:company>
<cc:item>email</cc:item>
</cc:specs>
|
||||
example output | |||||
example input |
<cc:specs> <cc:category>web page</cc:category> <cc:date>2002.03.20</cc:date> <cc:company>Brainbench</cc:company> <cc:section>Question of the Week</cc:section> <cc:os>Win XP</cc:os> <cc:browser>any</cc:browser> <cc:url>http://www.brainbench.com/xml/bb/qow/engqow.xml <i>(expired)</i></cc:url> <cc:homepage>http://www.brainbench.com</cc:homepage> </cc:specs> |
||||
diagram | |||||
namespace | cleancode.com | ||||
properties |
|
||||
children | category date company product pversion os section os browser url homepage item | ||||
source | <xs:element name="specs"> <xs:complexType> <xs:sequence> <xs:sequence> <xs:element name="category" type="xhtml:Inline"/> <xs:element name="date" type="xhtml:Inline"/> <xs:element name="company" type="xhtml:Inline"/> </xs:sequence> <xs:choice> <xs:sequence> <xs:annotation> <xs:documentation>software</xs:documentation> </xs:annotation> <xs:element name="product" type="xhtml:Inline"/> <xs:element name="pversion" type="xhtml:Inline"/> <xs:element name="os" type="xhtml:Inline"/> </xs:sequence> <xs:sequence> <xs:annotation> <xs:documentation>web page</xs:documentation> </xs:annotation> <xs:element name="section" type="xhtml:Inline"/> <xs:element name="os" type="xhtml:Inline"/> <xs:element name="browser" type="xhtml:Inline"/> <xs:element name="url" type="xhtml:Inline"/> <xs:element name="homepage" type="xhtml:Inline"/> </xs:sequence> <xs:element name="item" type="xhtml:Inline"> <xs:annotation> <xs:documentation>non-software/web page</xs:documentation> </xs:annotation> </xs:element> </xs:choice> </xs:sequence> </xs:complexType> </xs:element> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="category" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="date" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="company" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="product" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="pversion" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="os" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="section" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="os" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="browser" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="url" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
source | <xs:element name="homepage" type="xhtml:Inline"/> |
diagram | |||
namespace | cleancode.com | ||
type | xhtml:Inline | ||
properties |
|
||
annotation |
|
||
source | <xs:element name="item" type="xhtml:Inline"> <xs:annotation> <xs:documentation>non-software/web page</xs:documentation> </xs:annotation> </xs:element> |
diagram | |||||||
namespace | cleancode.com | ||||||
type | Flow | ||||||
properties |
|
||||||
children | xhtml:form example callout codeBlock incident product-summary files | ||||||
source | <xs:element name="background" type="Flow"/> |
diagram | |||||||
namespace | cleancode.com | ||||||
type | Flow | ||||||
properties |
|
||||||
children | xhtml:form example callout codeBlock incident product-summary files | ||||||
source | <xs:element name="scenario" type="Flow"/> |
diagram | |||||||
namespace | cleancode.com | ||||||
type | Flow | ||||||
properties |
|
||||||
children | xhtml:form example callout codeBlock incident product-summary files | ||||||
source | <xs:element name="issues" type="Flow"/> |
diagram | |||||||
namespace | cleancode.com | ||||||
type | Flow | ||||||
properties |
|
||||||
children | xhtml:form example callout codeBlock incident product-summary files | ||||||
source | <xs:element name="nutshell" type="Flow"/> |
example output | |||
example input |
<cc:product-summary> <cc:product-item name="Product">DataDiagnostic</cc:product-item> <cc:product-item name="Description">Diagnostic engine for software development</cc:product-item> <cc:product-item name="Language">Java, Perl, JavaScript</cc:product-item> <cc:product-item name="Interface">Code Instrumentation</cc:product-item> <cc:product-item name="Platform">any</cc:product-item> <cc:product-references name="Reference"> <cc:product-reference href="../../api/perl/Data/Diagnostic.html">Perl</cc:product-reference> <cc:product-reference href="../../api/java/com/cleancode/data/Diagnostic.html">Java</cc:product-reference> <cc:product-reference href="../../api/js/data/Diagnostic.html">JavaScript</cc:product-reference> </cc:product-references> </cc:product-summary> |
||
diagram | |||
namespace | cleancode.com | ||
properties |
|
||
children | product-item product-references | ||
used by |
|
||
annotation |
|
||
source | <xs:element name="product-summary"> <xs:annotation> <xs:documentation>CleanCode released product info</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="product-item" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="NonEmptyString"> <xs:attribute name="name" type="ShortString"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name="product-references"> <xs:complexType> <xs:sequence> <xs:element name="product-reference" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="ShortString"> <xs:attribute name="href" type="NonEmptyString"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="name" type="ShortString"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> |
diagram | |||||||||||||
namespace | cleancode.com | ||||||||||||
type | extension of NonEmptyString | ||||||||||||
properties |
|
||||||||||||
facets |
|
||||||||||||
attributes |
|
||||||||||||
source | <xs:element name="product-item" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="NonEmptyString"> <xs:attribute name="name" type="ShortString"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> |
diagram | |||||||||||||
namespace | cleancode.com | ||||||||||||
properties |
|
||||||||||||
children | product-reference | ||||||||||||
attributes |
|
||||||||||||
source | <xs:element name="product-references"> <xs:complexType> <xs:sequence> <xs:element name="product-reference" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="ShortString"> <xs:attribute name="href" type="NonEmptyString"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="name" type="ShortString"/> </xs:complexType> </xs:element> |
diagram | |||||||||||||
namespace | cleancode.com | ||||||||||||
type | extension of ShortString | ||||||||||||
properties |
|
||||||||||||
facets |
|
||||||||||||
attributes |
|
||||||||||||
source | <xs:element name="product-reference" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="ShortString"> <xs:attribute name="href" type="NonEmptyString"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> |
diagram | |||
namespace | cleancode.com | ||
properties |
|
||
children | xhtml:form example callout codeBlock incident product-summary files | ||
used by |
|
||
annotation |
|
||
source | <xs:complexType name="Flow" mixed="true"> <xs:annotation> <xs:documentation>Adapted from xhtml type of the same name.</xs:documentation> </xs:annotation> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="xhtml:block"/> <xs:element ref="xhtml:form"/> <xs:group ref="xhtml:inline"/> <xs:group ref="xhtml:misc"/> <xs:element ref="example"/> <xs:element ref="callout"/> <xs:element ref="codeBlock"/> <xs:element ref="incident"/> <xs:element ref="product-summary"/> <xs:element ref="files"/> </xs:choice> </xs:complexType> |
namespace | cleancode.com | ||||
type | restriction of xs:string | ||||
used by |
|
||||
facets |
|
||||
source | <xs:simpleType name="NonEmptyString"> <xs:restriction base="xs:string"> <xs:minLength value="1"/> </xs:restriction> </xs:simpleType> |
namespace | cleancode.com | ||||
type | restriction of xs:string | ||||
used by |
|
||||
facets |
|
||||
source | <xs:simpleType name="ShortString"> <xs:restriction base="xs:string"> <xs:minLength value="3"/> <xs:maxLength value="25"/> </xs:restriction> </xs:simpleType> |