An open API service indexing awesome lists of open source software.

https://github.com/h1alexbel/sxl

XML transformation language, similar to XSLT, but simpler
https://github.com/h1alexbel/sxl

programming-language xml xml-transformation xslt

Last synced: about 1 year ago
JSON representation

XML transformation language, similar to XSLT, but simpler

Awesome Lists containing this project

README

          

# SXL - Simpler XML Transformation Language

**Motivation**. [XSLT] is a functional language for [XML] transformations. It
is widely used in [web development][XML-in-Browser], [ETL] pipelines, and even
in language design ([EO-to-Java compiler][EO] is written in XSLT). However, the
complexity of the language is often a barrier for programmers not familiar with
XML. That's why we created a new language, with the same semantic as XSLT 3.0,
but with a simpler syntax, and user-friendly tooling.

## Quick Start

Consider this XML:

```xml

XML in a Nutshell
Code Complete

```

In SXL, we might transform it like this:

```xml
match -> "/books"
shelf
apply-templates -> "book"

template -> "book"
entry
text()
" by "
@author
```

You should have this XML in the result:

```xml

XML in a Nutshell by Elliotte Rusty Harold
Code Complete by Steve McConnell

```

BTW, this is how XSLT stylesheet will look like to achieve the same:

```xsl










by


```

[XSLT]: https://en.wikipedia.org/wiki/XSLT
[XML]: https://en.wikipedia.org/wiki/XML
[ETL]: https://en.wikipedia.org/wiki/Extract,_transform,_load
[EO]: https://github.com/objectioanary/eo
[XML-in-Browser]: https://www.yegor256.com/2014/06/25/xml-and-xslt-in-browser.html