liip/LiipXsltBundle

Name: LiipXsltBundle

Owner: Liip

Description: [DEPRECATED] Renderer for XSLT templates in Symfony2 (not actively maintained)

Created: 2011-01-10 10:09:49.0

Updated: 2017-12-05 09:27:28.0

Pushed: 2017-12-05 09:27:13.0

Homepage: http://liip.ch

Size: 43

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

UNMAINTAINED

This bundle is no longer maintained. Feel free to fork it if needed.

XsltBundle

Renderer for XSLT templates in Symfony2.

Installation

  1. Add the following lines in your deps file:

    pXsltBundle]
    git=http://github.com/liip/LiipXsltBundle.git
    target=/bundles/Liip/XsltBundle
    
  2. Run the vendors script:

    p bin/vendors install
    
  3. Add the Liip namespace to your autoloader:

    pp/autoload.php
    der->registerNamespaces(array(
    'Liip' => __DIR__.'/../vendor/bundles',
    // your other namespaces
    
    
  4. Add the bundle to your application kernel:

    pp/AppKernel.php
    ic function registerBundles()
    
    return array(
        // ...
        new Liip\XsltBundle\LiipXsltBundle(),
        // ...
    );
    
    
  5. Enable the XSLT template engine in the config

    p/config/config.yml
    .
    lating:      { engines: ['twig', 'xslt'] }
    .
    

Usage

Create an XSLT file in your views folder. Then in your controller simply call, where the name of the Bundle is HelloBundle and the name of the controller is HelloController:

return $this->render('HelloBundle:Hello:index.html.xsl', array('name' => $name));

Extensions

Extension can be used to add global data to the XML or to register PHP function callbacks.

This bundle already includes different extensions. To use them, use this in your application config:

# app/config/config.yml
liip_xslt:
     extensions: [liip_xslt.extension.environment, liip_xslt.extension.routes, liip_xslt.extension.debug]

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.