Want to contribute to the cheat sheet’s development? Here are some notes on how the source code is organized.
See also the end user documentation.
Note that if things look more complicated than needed, sometimes they are, sometimes they're lessons of previous problems; let’s discuss it!
For efficiency reasons, a lot of the components of the cheat sheet are minified, and for maintainability, a number of others are automatically generated. This can makes it daunting to figure what are the actual pieces of code that one can contribute to.
style/all.css(the one referred from the HTML frame)
js/all.js, with all the generated data prepended, and the JQuery framework on which it relies.
js/start.js relies on.
The extraction is done (in
The generated XML files follow the rules defined in the RelaxNG schema.
Each for the extraction stylesheets relies on a variety of sources to get the data, most of the time the specifications themselves; the HTML extraction also refers to other data for linking the accessibility, internationalization and mobile techniques.
data/all.jswhich compiles all the recognized keywords and their descriptions in a couple of arrays (
keywordsMatch) — this is done through the
xmltojson.xslstylesheet with the parameter
fullset to 1;
data/all-split.jswhich compiles the same arrays, but without the full descriptions embedded in
keywordsMatch— the full descriptions get then loaded through JSON (see below); this is done through the
xmltojson.xslstylesheet without setting the
data/json/*.jsoffer one JSON file per recognized (lowercased) keyword; these JSON files gets loaded when the full descriptions are not loaded in memory — e.g. for use in widget mode; they are generated through the
data/keywords.jsonlists all the known keywords and their number of matches, for use in the OpenSearch-suggests script.
(the names of the data files and XSLT stylesheets could use both more consistency and less resemblance among themselves — the current names can be relatively confusing)
The cheat sheet uses JQuery for simplified/cross-browsers DOM and AJAX manipulations, as well as for the following UI functionalities:
js/lib/jquery.autocomplete.js(could use merging/comparison with the official (?) JQuery Autocomplete plug-in).