PHPackages                             oeuvres/xsl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. oeuvres/xsl

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

oeuvres/xsl
===========

XSLT-1.0 package to transform texts, from and to, TEI

01851XSLTCI passing

Since Feb 24Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/oeuvres/teinte_xsl)[ Packagist](https://packagist.org/packages/oeuvres/xsl)[ RSS](/packages/oeuvres-xsl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Teinte, TEI shades, XSL pack
============================

[](#teinte-tei-shades-xsl-pack)

[teinte\_xsl](https://github.com/oeuvres/teinte_xsl/) is an XSLT-1.0 pack to transform XML texts, from, and to, different formats. The pivot format is a subset of [TEI](https://tei-c.org/release/docs/tei-p5-docs/en/html/REF-ELEMENTS.html), an academic XML schema dedicated to all forms of texts. Some formats have a complex packaging (docx, epub…). Such agregations requires another programation language for file manipulation or zipping (php, java, python…), but some results are already possible with xslt only, see below for browser or command line.

[![Teinte xsl graph](https://camo.githubusercontent.com/94fd7d9c11181b4d0220ef5524268f9e22da229d0f1da3b4b195abc169db4f6b/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f7465696e74655f78736c2e706e67)](https://camo.githubusercontent.com/94fd7d9c11181b4d0220ef5524268f9e22da229d0f1da3b4b195abc169db4f6b/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f7465696e74655f78736c2e706e67)

This pack is compatible with xsltproc and other XSLT engines. Tested with

- PHP: [teinte\_php](https://github.com/oeuvres/teinte_php)
- Java: [alix](https://github.com/oeuvres/alix)
- Javascript: direct transformation in browser (see below)
- Bash: (see below)
- Python: a command line pilot for Python is planned, needs support [teinte\_py](https://github.com/oeuvres/teinte_py)

Browser
=======

[](#browser)

All modern browsers have the xsltproc library embedded. This allows to provide direct transformation in the browser. See this [example XML file](https://oeuvres.github.io/teinte/examples/moliere_misanthrope.xml) under a web server, you should see a nicely formatted theatre play, even if it’s an [XML/TEI source](https://github.com/oeuvres/teinte/blob/main/examples/moliere_misanthrope.xml).

[![Misanthrope](https://camo.githubusercontent.com/beaa06acd8a5e2c07a102377491dcd3cfe3c888764bf873b36e499c5c6ad3d6f/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f73637265656e732f2f7465696e74655f6d6973616e7468726f70652e706e67)](https://camo.githubusercontent.com/beaa06acd8a5e2c07a102377491dcd3cfe3c888764bf873b36e499c5c6ad3d6f/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f73637265656e732f2f7465696e74655f6d6973616e7468726f70652e706e67)

The magic rely on the XML prolog of the file

```

```

This can be added to all TEI files to provide instant formatting online.

Offline, this feature is blocked for security reasons, see for example (image below) the result and the reason on the Google LLC proprietary browser. The open source [Firefox](https://www.mozilla.org/fr/firefox/new/) browser offers a workaround to bypass this security setting (list below). This little manipulation is done for ever, is reversible, is a lot less risky than javascript through the web, but industry has more interests in JS than XSLT. For a TEI editor, this allows to see the results of its XML modifications by a simple reload in the browser.

[![Google.LLC.Chrome fileuri](https://camo.githubusercontent.com/3710b31c2452ffc385bc4b13ac9e21d0a0d708c3ad58da2eee17c6b3ce7a0231/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f73637265656e732f6368726f6d655f66696c657572692e706e67)](https://camo.githubusercontent.com/3710b31c2452ffc385bc4b13ac9e21d0a0d708c3ad58da2eee17c6b3ce7a0231/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f73637265656e732f6368726f6d655f66696c657572692e706e67)

1. Firefox browser, in address bar, type `about:config`
2. accept security alert
3. search for the property: security.fileuri.strict\_origin\_policy
4. set to false

[![Firefox fileuri](https://camo.githubusercontent.com/6a95b7e543254e845d54e67a491ede5e8274515b99e610da0e73531f0b25acdb/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f73637265656e732f66697265666f785f66696c657572692e706e67)](https://camo.githubusercontent.com/6a95b7e543254e845d54e67a491ede5e8274515b99e610da0e73531f0b25acdb/68747470733a2f2f6f6575767265732e6769746875622e696f2f7465696e74652f646f63732f73637265656e732f66697265666f785f66696c657572692e706e67)

Bash
====

[](#bash)

Under a linux box, or with a [WSL linux](https://ubuntu.com/wsl) on Microsoft.Windows, install xsltproc, and tranform your files.

```
sudo apt install xsltproc
cd teinte_xsl
xsltproc tei2html.xsl tests/moliere_misanthrope.xml
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance56

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d3836dbe6b685158d5192cb05bc2ed75f189de2bd66170fc74c3061b82bde04?d=identicon)[glorieux-f](/maintainers/glorieux-f)

---

Top Contributors

[![glorieux-f](https://avatars.githubusercontent.com/u/5686231?v=4)](https://github.com/glorieux-f "glorieux-f (273 commits)")

### Embed Badge

![Health badge](/badges/oeuvres-xsl/health.svg)

```
[![Health](https://phpackages.com/badges/oeuvres-xsl/health.svg)](https://phpackages.com/packages/oeuvres-xsl)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
