<commit_before>
# What is DOMML?
With DOMML, you can write DOM as JSON in JavaScript files instead of writing HTML tags.

# Examples

## Example #1 defining a simple div data.

- tag => html tag name
- id => id
- class => class
- style => style

a DOMML data:

`    {
        'tag': 'div',
         'id': 'divid',
      'class': 'divclass',
      'style': { 'border': 'solid 1px black' }
    }`

is equivalent to this html:

`    <div id='divid' class='divclass' style='border: solid 1px black'></div>`

## Example #2 defining a content data.

- content => a content of the tag

this DOMML data

`    {
           'tag': 'div',
       'content': 'a div content'
    }`

is equivalent to this html.

`    <div>a div content</div>`

## Example #3 defining nested tags.

- contains => child nodes.

this DOMML data

`    {
            'tag': 'ul',
       'contains': [
          { 'tag': 'li', 'content': 'item 1' },
          { 'tag': 'li', 'content': 'item 2' }]
    }`

is equivalent to this html.

`    <ul><li>item one</li><li>item two</li></ul>`

## Example #4 div is the default tag.

when the 'tag' entry is omitted, it is handled as div tag.

this DOMML data

`    {
      'content': 'some text'
    }`

is equivalent to this html.

`    <div>some text</div>`

## Example #5 Event Handlers
- TBD

## Example #6 Templating
- TBD

# Similar Projects

## Backbone.View
- http://backbonejs.org/
- has functionarity of creating DOM element from JSON data
- has an easy to use event handler binding
- lacks a functionarity of creating nested view in declarative manner

## enyo.js Component
- http://enyojs.com/
- has functionarity of creating DOM element from JSON data
- has an easy to use event handler binding
- making nested view in declarative manner is easy.

## microjungle.js
- https://github.com/deepsweet/microjungle
- has functionarity of creating DOM element from JSON data
- you can define HTML tags as JavaScript Array.

## JSONML Object Format
- http://jsonml.org/
- http://en.wikipedia.org/wiki/JsonML
- is a markup language to generate HTML documents from JSON data

<commit_msg>more fixes of read me<commit_after>
# What is DOMML?
With DOMML, you can write DOM as JSON in JavaScript files instead of writing HTML tags.

# Examples

## Example #1 defining a simple div data.

- tag => html tag name
- id => id
- class => class
- style => style

a DOMML data:

`    {
        'tag': 'div',
         'id': 'divid',
      'class': 'divclass',
      'style': { 'border': 'solid 1px black' }
    }`

is equivalent to this html:

`    <div id='divid' class='divclass' style='border: solid 1px black'></div>`

## Example #2 defining a content data.

- content => a content of the tag

this DOMML data

`    {
           'tag': 'div',
       'content': 'a div content'
    }`

is equivalent to this html.

`    <div>a div content</div>`

## Example #3 defining nested tags.

- contains => child nodes.

this DOMML data

`    {
            'tag': 'ul',
       'contains': [
          { 'tag': 'li', 'content': 'item 1' },
          { 'tag': 'li', 'content': 'item 2' }]
    }`

is equivalent to this html.

`    <ul><li>item one</li><li>item two</li></ul>`

## Example #4 div is the default tag.

when the 'tag' entry is omitted, it is handled as div tag.

this DOMML data

`    {
      'content': 'some text'
    }`

is equivalent to this html.

`    <div>some text</div>`

## Example #5 Event Handlers
- TBD

## Example #6 Templating
- TBD

# Similar Projects

## Backbone.View
- http://backbonejs.org/
- has a functionarity of creating DOM elements from JavaScript objects
- has an easy to use event handler binding facility
- lacks a functionarity of creating nested views in a declarative manner

## enyo.js Component
- http://enyojs.com/
- has a functionarity of creating DOM elements from JavaScript objects
- has an easy to use event handler binding facility
- making nested views in a declarative manner is easy.

## microjungle.js
- https://github.com/deepsweet/microjungle
- has a functionarity of creating DOM elements from JSON data
- heavily utilizes the JavaScript Array literal format

## JSONML Object Format
- http://jsonml.org/
- http://en.wikipedia.org/wiki/JsonML
- is a markup language to generate HTML documents from JSON data


{'fraction_non_alphanumeric': 0.12276995305164319, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 2.804464285714286, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 39, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5125689', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1322, 'n_words': 530}