Download the PHP package theseer/fxsl without Composer

On this page you can find all versions of the php package theseer/fxsl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fxsl

fXSL

The classes contained within this repository extend the standard XSLTProcessor to use exceptions at all occasions of errors instead of PHP warnings, notices or semi completed transformations. They also add various custom methods and shortcuts for convinience and to allow a nicer API to implement callbacks to the PHP stack.

Requirements

PHP: 5.3.3 (5.3.0-5.3.2 had serious issues with spl stacked autoloaders)
Extensions: dom, xsl, libxml

Installation

fXSL can be installed using the PEAR Installer, the backbone of the PHP Extension and Application Repository that provides a distribution system for PHP packages.

Depending on your OS distribution and/or your PHP environment, you may need to install PEAR or update your existing PEAR installation before you can proceed with the instructions in this chapter. sudo pear upgrade PEAR usually suffices to upgrade an existing PEAR installation. The PEAR Manual explains how to perform a fresh installation of PEAR.

The following two commands are all that is required to install fDOMDocument using the PEAR Installer:

sudo pear channel-discover pear.netpirates.net
sudo pear install TheSeer/fXSL

After the installation you can find the source files inside your local PEAR directory; the path is usually either /usr/share/pear/TheSeer/fXSL (Fedora/Redhat) or /usr/lib/php/TheSeer/fXSL (Debian/Ubuntu).

Usage

Simply require/include the autoload.php supplied and you can start using fXSL as a drop in replacement for the standard XSLTProcessor.

Usage Samples

PHP Code:

<root />');
      $p = $x->createTextNode($a . ' -> ' . $b);
      $x->documentElement->appendChild($p);
      return $x->documentElement;
   }
}

$tpl = new DOMDocument();
$tpl->load('test.xsl');

$dom = new DOMDocument();

$xsl = new fXSLTProcessor($tpl);
$xsl->registerPHPFunctions('demo');

$test = new fXSLCallback('test:only','test');
$test->setObject(new foo());

$xsl->registerCallback($test);

$result = $xsl->transformToXml($dom);

$tpl->formatOutput = true;
echo "Template:\n" . $tpl->saveXML();

echo "\n\nOutput:\n".$result;

?>

The 'test.xsl' XSL Stylesheet used:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="php foo"
    xmlns:foo="test:uri"
    extension-element-prefixes="php func" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:php="http://php.net/xsl">

    <xsl:output method="xml" indent="yes" encoding="utf-8" />

    <xsl:template match="/">
        <root>
            <!-- classic php function callback -->
            <demo><xsl:value-of select="php:function('demo')" /></demo>

            <!-- fXSL registered callback method -->
            <test><xsl:copy-of select="test:bar('hello','world')" /></test>
        </root>
    </xsl:template>

</xsl:stylesheet>

Changelog

Release 1.1.0
Release 1.0.4
Release 1.0.3
Release 1.0.2
Release 1.0.1
Release 1.0.0

All versions of fxsl with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
ext-libxml Version *
ext-dom Version *
ext-xsl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package theseer/fxsl contains the following files

Loading the files please wait ....