Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Error handling with libxml error handling functionsXSLTProcessor::__construct>
^XSLLast updated: Mon, 26 Oct 2026

The XSLTProcessor class

(PHP 5, PHP 7, PHP 8)

Introduction

Class synopsis

class XSLTProcessor {
/* Properties */
public bool $doXInclude = false;
public bool $cloneDocument = false;
/* Methods */
public function getParameter(string $namespace, string $name): string|false
public function getSecurityPrefs(): int
public function hasExsltSupport(): bool
public function importStylesheet(object $stylesheet): bool
public function registerPHPFunctionNS(string $namespaceURI, string $name, callable $callable): void
public function registerPHPFunctions(array|string|null $functions = null): void
public function removeParameter(string $namespace, string $name): bool
public function setParameter(string $namespace, string $name, string $value): bool
public function setParameter(string $namespace, array $options): bool
public function setProfiling(?string $filename): true
public function setSecurityPrefs(int $preferences): int
public function transformToDoc(object $document, ?string $returnClass = null): object|false
public function transformToUri(object $document, string $uri): int
public function transformToXml(object $document): string|null|false
}

Properties

doXInclude

Whether to perform xIncludes.

cloneDocument

Whether to perform the transformation on a clone of the document.

maxTemplateDepth

The maximum template recursion depth.

maxTemplateVars

The maximum number of variables in the template.

Changelog

Version Description
8.4.0 The properties doXInclude and cloneDocument are now explicitly defined on the class.
8.4.0 Added properties maxTemplateDepth and maxTemplateVars.

Table of Contents


<Error handling with libxml error handling functionsXSLTProcessor::__construct>
^XSLLast updated: Mon, 26 Oct 2026