Class: XSLT
Properties
$doc
The XMLDoc object that was last parsed.
$error
Will contain the error message in the event of a parsing error, or false
otherwise, so that it can be used in an if (error) statement.
$client
The XML-RPC client object.
$errno
The error number (faultCode) if an error occurs.
$name
$value
Value of the attribute.
$version
XML version. Default is 1.0
$encoding
The optional encoding type to use when creating the XML parser resource.
$doctype
May contain the entire DOCTYPE declaration tag, including the
< and >.
$root
The root node of the XML document.
$filename
If this object was read in from a file, it may be specified here.
$xquery
If query() has been called, this will contain the XMLDocQuery object.
$content
Content of the node.
$children = array ()
$attributes = array ()
Array of attribute objects.
$comment
The contents of the current comment tag.
$cdata = false
Notes whether the contents of this node should be displayed as
a <![CDATA[ ... ]]> block.
$number = 0
Contains the number of this node within its parent node. Numbers
only increase when more than one child has the same name.
$parent = array ()
A list of references to the next node in the XMLDoc hierarchy.
Destroyed before returning from parse().
$callbackStart = false
The function or method to use as a callback for the start tag
of the current XML node.
$callbackEnd = false
The function or method to use as a callback for the end tag
of the current XML node.
$callbackObject = false
The object that contains the methods listed in $callbackStart
and $callbackEnd (if they are methods and not ordinary custom or built-in
PHP functions).
$propagateCallback = false
Whether or not to propagate callback settings to new child
nodes upon their creation. Defaults to false.
$nodes
$condition
If a condition token is found, this is set to an array containing
the 'operator' and the 'left' node set of the condition.
$rules = array ()
$current
$schema
$tags
$types = array ('text', 'empty', 'data')
$parser
The parser created during calls to parse(). Destroyed before returning
from parse().
$rule = 'required'
$err_line
Will contain the error line in the event of a parsing error.
$err_code
Will contain the error code in the event of a parsing error.
$err_byte
Will contain the error byte index in the event of a parsing error.
$err_colnum
Will contain the error column number in the event of a parsing error.
$attrs = array ()
$type = false
$ns
$parents
$test
$xslt
This is an XSLT processor resource returned by the
xslt_create () function. Please note: the XSLT processor
is not created until the process method of this class is
called, so as to maintain compatibility with systems that
do not have Sablotron support installed, but are using
EasyText.
$docroot
If an RSS document is being created, this will
contain a reference to the root node.
$channel
If an RSS document is being created, this will
contain a reference to the current channel.
$comment_open = false
$handle
This is the XSLT processor resource returned by the
xslt_create () function.
Return to Top
Methods
XSLT ()
Constructor method.
process ($xsl_data = '', $xml_data = '', $params = array ())
- Access: public
- Return: string
Transforms the given XML data and XSL stylesheet and
returns the completed transformation as a string, or returns
zero (0) in case of failure. Note: The $params property only
works with more recent versions of PHP (ie. 4.2+).
error ()
- Access: public
- Return: string
Returns the current error message.
errno ()
- Access: public
- Return: string
Returns the current error number.
free ()
Frees the XSL processor.
Return to Top