XSLTProcessor
class XSLTProcessor (View source)
Properties
| bool | $cloneDocument | Controls whether the input document is cloned before transformation |
|
| bool | $doXInclude | Controls whether XInclude substitution is performed |
|
| int | $maxTemplateDepth | The maximum template nesting depth |
|
| int | $maxTemplateVars | The maximum number of template variables |
Methods
Import stylesheet
Transform to a DOMDocument
Set value for a parameter
Get value of a parameter
Remove parameter
Determine if PHP has EXSLT support
Enables the ability to use PHP functions as XSLT functions
Registers a PHP function to be callable from XSLT under the given namespace
Sets profiling output file
Set security preferences
Get security preferences
Details
bool
importStylesheet(object $stylesheet)
Import stylesheet
object|false
transformToDoc(object $document, string|null $returnClass = null)
Transform to a DOMDocument
int
transformToUri(DOMDocument|SimpleXMLElement $document, string $uri)
Transform to URI
string|false|null
transformToXml(DOMDocument|SimpleXMLElement $document)
Transform to XML
bool
setParameter(string $namespace, string $name, string $value = null)
Set value for a parameter
string|false
getParameter(string $namespace, string $name)
Get value of a parameter
bool
removeParameter(string $namespace, string $name)
Remove parameter
bool
hasExsltSupport()
Determine if PHP has EXSLT support
void
registerPHPFunctions(array|string|null $functions = null)
Enables the ability to use PHP functions as XSLT functions
void
registerPHPFunctionNS(string $namespaceURI, string $name, callable $callable)
Registers a PHP function to be callable from XSLT under the given namespace
bool
setProfiling(string $filename)
Sets profiling output file
int
setSecurityPrefs(int $preferences)
Set security preferences
int
getSecurityPrefs()
Get security preferences