2017 © Pedro Pelรกez
 

library tabular

Generate complex tables from simple configuration

image

phpbench/tabular

Generate complex tables from simple configuration

  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 4 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Tabular

tabularlogo-2, (*1)

Build Status StyleCI, (*2)

Tabular is a library for transforming a source XML document into a tabular XML document using a given configuration. The resulting tabular XML document can then transformed or used to easily render tables (for example in HTML or in the console)., (*3)

Tabular is better than spreadsheets., (*4)

Documentation

See the official documentation., (*5)

Example

The central concept is the definition file:, (*6)

{
    "rows": [
        {
            "cells": [
                {
                    "name": "title",
                    "expr": "string(./title)"
                },
                {
                    "name": "price",
                    "expr": "number(./price)"
                }
            ],
            "with_query": "//book"
        },
        {
            "cells": [
                {
                    "name": "price",
                    "expr": "sum(//price)"
                }
            ]
        }
    ]
}
````

The above definition will generate a table representation in XML with a row
for each `<book/>` element in the given XML file and provide an additional row
showing the sum of all the `<price/>` elements of the `<book/>` element.

So given the following XML file:

```xml
    
    <store>
        <book>
            <title>War and Peace</title>
            <price>5.00</price>
        </book>
        <book>
            <title>One Hundered Years of Soliture</title>
            <price>7</price>
        </book>
    </store>
````

The generated table might look like this (as rendered by the [Tabular
CLI](https://github.com/phpbench/tabular-cli)):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ title โ”‚ price โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ War and Peace โ”‚ 5 โ”‚ โ”‚ One Hundered Years of Soliture โ”‚ 7 โ”‚ โ”‚ โ”‚ 12 โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ```, (*7)

The Versions

18/01 2016

dev-master

9999999-dev

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

27/12 2015

0.4.1

0.4.1.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

23/12 2015

dev-class_token_replacement

dev-class_token_replacement

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

13/12 2015

0.4.0

0.4.0.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

26/11 2015

0.3.0

0.3.0.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

21/11 2015

dev-standard_deviation

dev-standard_deviation

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

12/11 2015

0.2.3

0.2.3.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

27/10 2015

0.2.2

0.2.2.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

30/09 2015

0.2.1

0.2.1.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

13/09 2015

0.2

0.2.0.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires

 

02/09 2015

0.1

0.1.0.0

Generate complex tables from simple configuration

  Sources   Download

MIT

The Requires