class SaxonProcessor (View source)

Methods

__construct(bool $license = false, string $cwd = '')

Constructor

createAtomicValue(bool|int|float|string $primitive_type_val)

Create an Xdm Atomic value from any of the main primitive types (i.e. bool, int, float, string)

parseXmlFromString(string $value)

Create an XdmNode object.

parseXmlFromFile(string $fileName)

Create an XdmNode object.

void
setcwd(string $cwd)

Set the current working directory used to resolve against files

void
setResourceDirectory(string $dir)

Set the resources directory of where Saxon can locate data folder

void
setConfigurationProperty(string $name, string $value)

Set a configuration property specific to the processor in use. Properties specified here are common across all the processors.

newXsltProcessor()

Create an XsltProcessor} in the PHP environment. An {@link XsltProcessor is used to compile and execute XSLT sytlesheets

newXslt30Processor()

Create an Xslt30Processor} in the PHP environment. An {@link Xslt30Processor} is used to compile and execute XSLT 3.0 stylesheets, but can also be used for XSLT 2.0 or 1.0 stylesheets. Use an {@link Xslt30Processor} instead of {@link XsltProcessor for XSLT 3.0 processing.

newXQueryProcessor()

Create an XQueryProcessor} in the PHP environment. An {@link XQueryProcessor is used to compile and execute XQuery queries

newXPathProcessor()

Create an XPathProcessor} in the PHP environment. An {@link XPathProcessor is used to compile and execute XPath queries

newSchemaValidator()

Create a SchemaValidator} in the PHP environment. A {@link SchemaValidator provides capabilities to load and cache XML schema definitions. You can also validate source documents with registered XML schema definitions

string
version()

Report the Java Saxon version

void
registerPHPFunctions(string $library)

Enables the ability to use PHP functions as XSLT functions. Accepts as parameter the full path of the Saxon/C PHP Extension library. This is needed to do the callbacks.

Details

__construct(bool $license = false, string $cwd = '')

Constructor

Parameters

bool $license

Indicates whether the Processor requires features of Saxon that need a license file. If false, the method will creates a Configuration appropriate for Saxon HE (Home edition). If true, the method will create a Configuration appropriate to the version of the software that is running Saxon-PE or Saxon-EE.

string $cwd

The cwd argument is used to manually set the current working directory used for executions of source files

XdmValue createAtomicValue(bool|int|float|string $primitive_type_val)

Create an Xdm Atomic value from any of the main primitive types (i.e. bool, int, float, string)

Parameters

bool|int|float|string $primitive_type_val

Return Value

XdmValue

XdmNode parseXmlFromString(string $value)

Create an XdmNode object.

Parameters

string $value

The $value is a lexical representation of the XML document.

Return Value

XdmNode

XdmNode parseXmlFromFile(string $fileName)

Create an XdmNode object.

Parameters

string $fileName

Value is a string type and the file name to the XML document. File name can be relative or absolute. IF relative the cwd is used to resolve the file.

Return Value

XdmNode

void setcwd(string $cwd)

Set the current working directory used to resolve against files

Parameters

string $cwd

Return Value

void

void setResourceDirectory(string $dir)

Set the resources directory of where Saxon can locate data folder

Parameters

string $dir

Return Value

void

void setConfigurationProperty(string $name, string $value)

Set a configuration property specific to the processor in use. Properties specified here are common across all the processors.

Parameters

string $name
string $value

Return Value

void

XsltProcessor newXsltProcessor()

Create an XsltProcessor} in the PHP environment. An {@link XsltProcessor is used to compile and execute XSLT sytlesheets

Return Value

XsltProcessor

Xslt30Processor newXslt30Processor()

Create an Xslt30Processor} in the PHP environment. An {@link Xslt30Processor} is used to compile and execute XSLT 3.0 stylesheets, but can also be used for XSLT 2.0 or 1.0 stylesheets. Use an {@link Xslt30Processor} instead of {@link XsltProcessor for XSLT 3.0 processing.

Return Value

Xslt30Processor

XQueryProcessor newXQueryProcessor()

Create an XQueryProcessor} in the PHP environment. An {@link XQueryProcessor is used to compile and execute XQuery queries

Return Value

XQueryProcessor

XPathProcessor newXPathProcessor()

Create an XPathProcessor} in the PHP environment. An {@link XPathProcessor is used to compile and execute XPath queries

Return Value

XPathProcessor

SchemaValidator newSchemaValidator()

Create a SchemaValidator} in the PHP environment. A {@link SchemaValidator provides capabilities to load and cache XML schema definitions. You can also validate source documents with registered XML schema definitions

Return Value

SchemaValidator

string version()

Report the Java Saxon version

Return Value

string

void registerPHPFunctions(string $library)

Enables the ability to use PHP functions as XSLT functions. Accepts as parameter the full path of the Saxon/C PHP Extension library. This is needed to do the callbacks.

Parameters

string $library

The full path of the Saxon/C PHP Extension library. This is needed to do the callbacks.

Return Value

void