PHPackages                             kucherenko/silex-xsltemplate - 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. kucherenko/silex-xsltemplate

ActiveLibrary

kucherenko/silex-xsltemplate
============================

The SilexXSLTemplate\\ServiceProvider provides integration Silex microframework with the XSLTemplate template engine.

28PHP

Since Oct 5Pushed 13y ago1 watchersCompare

[ Source](https://github.com/kucherenko/Silex-XSLTemplate)[ Packagist](https://packagist.org/packages/kucherenko/silex-xsltemplate)[ RSS](/packages/kucherenko-silex-xsltemplate/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SilexXSLTemplate\\ServiceProvider
=================================

[](#silexxsltemplateserviceprovider)

The *SilexXSLTemplate\\ServiceProvider* provides integration [Silex](http://silex.sensiolabs.org/) microframework with the [XSLTemplate](https://github.com/kucherenko/xsltemplate/) template engine.

Works with PHP 5.3.2 or later.

Parameters
----------

[](#parameters)

- **xsltemplate.templates.path**: Path to the directory containing xsl template files.
- **xsltemplate.templates.url**: HTTP url to xsl templates.
- **xsltemplate.parameters** (optional): An associative array of xsltemplate parameters. Check out the xsltemplate documentation for more information.

Services
--------

[](#services)

- **xsltemplate**: The `XSLTemplate\Renderer` instance. The main way of interacting with XSLTemplate.
- **xsltemplate.writer**: The `XSLTemplate\XML\Writer` instance. Object for collect data for template in xml format.
- **xsltemplate.configure**: Protected closure that takes the XSLTemplate environment as an argument. You can use it to add more custom globals.

Registering
-----------

[](#registering)

Make sure you place a copy of *XSLTemplate* in the `vendor/xsltemplate`directory:

```
$app->register(new SilexXSLTemplate\ServiceProvider(), array(
    'xsltemplate.templates.path' => __DIR__ . '/xsl',
    'xsltemplate.templates.url'  => 'xsl/',
    'xsltemplate.class_path'     => __DIR__ . '/vendor/xsltemplate/src',
));
```

Usage
-----

[](#usage)

The XSLTemplate provider provides a `xsltemplate` service:

```
$app->get('/hello/{name}', function ($name) use ($app) {

    $app['xsltemplate.writer']->writeElement('page', 'test');

    $content = $app['xsltemplate']->render('hello.xsl', $app['xsltemplate.writer']);
    $contentType = $app['xsltemplate']->getContentType();

    return new Symfony\Component\HttpFoundation\Response(
        $content,
        200,
        array('Content-Type' => $contentType)
    );
});
```

This will render a file named `xsl/hello.xsl`.

For more information, check out the [XSLTemplate documentation](https://github.com/kucherenko/xsltemplate/tree/master/doc).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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://avatars.githubusercontent.com/u/37810?v=4)[Andreas Krey](/maintainers/apk)[@apk](https://github.com/apk)

---

Top Contributors

[![kucherenko](https://avatars.githubusercontent.com/u/159307?v=4)](https://github.com/kucherenko "kucherenko (7 commits)")

### Embed Badge

![Health badge](/badges/kucherenko-silex-xsltemplate/health.svg)

```
[![Health](https://phpackages.com/badges/kucherenko-silex-xsltemplate/health.svg)](https://phpackages.com/packages/kucherenko-silex-xsltemplate)
```

PHPackages © 2026

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