<commit_before># AxeML

AxeML is a notation for Nokogiri XML documents inspired by [SXML](http://okmij.org/ftp/Scheme/SXML.html).

## Syntax

A document is represented by an array, possibly nested. The first
element of each array must be a symbol indicating the node
name. Further elements may either be strings or numbers which are
treated as the node's content, hashes representing this node's
attributes or further arrays which are then made into child nodes by
the same rules.

The syntax can be described by the following rammar:

    node       ::= [node-name, (node | attributes | content) ...]
    node-name  ::= Symbol
    attributes ::= Hash
    content    ::= String | Fixnum | Float


## Example

    AxeML.transform([:ul, { :class => 'menu' },
                     [:li, [:a, { :href => '/foo' }, 'foo']],
                     [:li, [:a, { :href => '/bar' }, 'bar']]]).to_s

    =>

    <?xml version="1.0"?>
    <ul class="menu">
      <li>
	<a href="/foo">foo</a>
      </li>
      <li>
	<a href="/bar">bar</a><commit_msg>update grammar<commit_after># AxeML

AxeML is a notation for Nokogiri XML documents inspired by [SXML](http://okmij.org/ftp/Scheme/SXML.html).

## Syntax

A document is represented by an array, possibly nested. The first
element of each array must be a symbol indicating the node
name. Further elements may either be strings or numbers which are
treated as the node's content, hashes representing this node's
attributes or further arrays which are then made into child nodes by
the same rules.

The syntax can be described by the following rammar:

    node       ::= [<node-name>, (<node> | <attributes> | <content>) ...]
    node-name  ::= <Symbol>
    attributes ::= <Hash>
    content    ::= <String> | <Fixnum> | <Float>


## Example

    AxeML.transform([:ul, { :class => 'menu' },
                     [:li, [:a, { :href => '/foo' }, 'foo']],
                     [:li, [:a, { :href => '/bar' }, 'bar']]]).to_s

    =>

    <?xml version="1.0"?>
    <ul class="menu">
      <li>
	<a href="/foo">foo</a>
      </li>
      <li>
	<a href="/bar">bar</a>
{'fraction_non_alphanumeric': 0.15193502150023888, 'fraction_numerical': 0.0019111323459149545, 'mean_word_length': 2.752688172043011, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 2, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1287563', 'n_tokens_mistral': 678, 'n_tokens_neox': 646, 'n_words': 236}