I bind things to HTML objects using javascript and need a slightly more complex mechanism than just class names.
My first approach was to use class names, such as structure declarations, where the binding is at the position of the name like this:
Definition = identifier: foo bar baz
Encoding some class name using this definition gives
<p id="someid" class="identifier bish bash bosh">
<div id="anotherid" class="identifier heebie jeebie">
Then it can be read as:
{foo: bish, bar: bash, baz: bosh};
{foo: heebie, bar: jeebie}
Note that bindings have different parameter values.
It is very fragile. I can not decorate any html elements with additional names (for example, to add jquery behavior such as drag and drop, etc.) and, as a rule, a little cheesy ...
What I would like to do is represent them as key value pairs like this:
<p id="someid" class="id{foo:bish} id{bar:bash} id{baz:bosh} random class">
<div id="anotherid" class="ui-draggable id{bar:jeebie} id{foo:heebie}">
, GUID sorta ( " " ...)
, , classnames - CDATA, tickety-boo, ! ...
, , , KV , .