Class XML


Located in File: Program_Root/xml.inc.php


Class for accessing XML data through the XPath language.

 This class offers methods for accessing the nodes of a XML document using 
 the XPath language. You can add or remove nodes, set or modify their 
 content and their attributes. No additional PHP extensions like DOM XML 
 or something similar are required to use these features.

 

Class Variable Summary
$nodes
List of all document nodes.
Default Value: ->array()<-
$ids
List of document node IDs.
Default Value: ->array()<-
$path
Current document path.
Default Value: ->""<-
$position
Current document position.
Default Value: ->0<-
$root
Path of the document root.
Default Value: ->""<-
$xpath
Current XPath expression.
Default Value: ->""<-
$entities
List of entities to be converted.
Default Value: ->><-
$axes
List of supported XPath axes.
Default Value: ->array<-
$functions
List of supported XPath functions.
Default Value: ->array<-
$operators
List of supported XPath operators.
Default Value: ->;<-

Method Summary
XML ( [$file = ""] )
Constructor of the class.
load_file ( $file )
Reads a file and parses the XML data.
get_file ( [$highlight = array()], [$root = ""], $level )
Generates a XML file with the content of the current document.
add_node ( $context, $name )
Adds a new node to the XML document.
remove_node ( $node )
Removes a node from the XML document.
add_content ( $path, $value )
Add content to a node.
set_content ( $path, $value )
Set the content of a node.
get_content ( $path )
Retrieves the content of a node.
add_attributes ( $path, $attributes )
Add attributes to a node.
set_attributes ( $path, $attributes )
Sets the attributes of a node.
get_attributes ( $path )
Retrieves a list of all attributes of a node.
get_name ( $path )
Retrieves the name of a document node.
evaluate ( $path, [$context = ""] )
Evaluates an XPath expression.
handle_start_element ( $parser, $name, $attributes )
Handles opening XML tags while parsing.
handle_end_element ( $parser, $name )
Handles closing XML tags while parsing.
handle_character_data ( $parser, $text )
Handles character data while parsing.
split_paths ( $expression )
Splits an XPath expression into its different expressions.
split_steps ( $expression )
Splits an XPath expression into its different steps.
get_axis ( $step, $node )
Retrieves axis information from an XPath expression step.
search_string ( $term, $expression )
Looks for a string within another string.
is_function ( $expression )
Checks for a valid function name.
evaluate_step ( $context, $steps )
Evaluates a step of an XPath expression.
evaluate_function ( $function, $arguments, $node )
Evaluates an XPath function
evaluate_predicate ( $node, $predicate )
Evaluates a predicate on a node.
check_predicates ( $nodes, $predicates )
Checks whether a node matches predicates.
check_node_test ( $context, $node_test )
Checks whether a node matches a node-test.
handle_axis_child ( $axis, $context )
Handles the XPath child axis.
handle_axis_parent ( $axis, $context )
Handles the XPath parent axis.
handle_axis_attribute ( $axis, $context )
Handles the XPath attribute axis.
handle_axis_self ( $axis, $context )
Handles the XPath self axis.
handle_axis_descendant ( $axis, $context )
Handles the XPath descendant axis.
handle_axis_ancestor ( $axis, $context )
Handles the XPath ancestor axis.
handle_axis_namespace ( $axis, $context )
Handles the XPath namespace axis.
handle_axis_following ( $axis, $context )
Handles the XPath following axis.
handle_axis_preceding ( $axis, $context )
Handles the XPath preceding axis.
handle_axis_following_sibling ( $axis, $context )
Handles the XPath following-sibling axis.
handle_axis_preceding_sibling ( $axis, $context )
Handles the XPath preceding-sibling axis.
handle_axis_descendant_or_self ( $axis, $context )
Handles the XPath descendant-or-self axis.
handle_axis_ancestor_or_self ( $axis, $context )
Handles the XPath ancestor-or-self axis.
handle_function_last ( $node, $arguments )
Handles the XPath function last.
handle_function_position ( $node, $arguments )
Handles the XPath function position.
handle_function_count ( $node, $arguments )
Handles the XPath function count.
handle_function_id ( $node, $arguments )
Handles the XPath function id.
handle_function_name ( $node, $arguments )
Handles the XPath function name.
handle_function_string ( $node, $arguments )
Handles the XPath function string.
handle_function_concat ( $node, $arguments )
Handles the XPath function concat.
handle_function_starts_with ( $node, $arguments )
Handles the XPath function starts-with.
handle_function_contains ( $node, $arguments )
Handles the XPath function contains.
handle_function_substring_before ( $node, $arguments )
Handles the XPath function substring-before.
handle_function_substring_after ( $node, $arguments )
Handles the XPath function substring-after.
handle_function_substring ( $node, $arguments )
Handles the XPath function substring.
handle_function_string_length ( $node, $arguments )
Handles the XPath function string-length.
handle_function_translate ( $node, $arguments )
Handles the XPath function translate.
handle_function_boolean ( $node, $arguments )
Handles the XPath function boolean.
handle_function_not ( $node, $arguments )
Handles the XPath function not.
handle_function_true ( $node, $arguments )
Handles the XPath function true.
handle_function_false ( $node, $arguments )
Handles the XPath function false.
handle_function_lang ( $node, $arguments )
Handles the XPath function lang.
handle_function_number ( $node, $arguments )
Handles the XPath function number.
handle_function_sum ( $node, $arguments )
Handles the XPath function sum.
handle_function_floor ( $node, $arguments )
Handles the XPath function floor.
handle_function_ceiling ( $node, $arguments )
Handles the XPath function ceiling.
handle_function_round ( $node, $arguments )
Handles the XPath function round.
handle_function_text ( $node, $arguments )
Handles the XPath function text.
prestr ( $string, $delimiter )
Retrieves a substring before a delimiter.
afterstr ( $string, $delimiter )
Retrieves a substring after a delimiter.
display_error ( $message )
Displays an error message.

Variable Detail

$nodes

List of all document nodes.

 This array contains a list of all document nodes saved as an
 associative array.

     array


$ids

List of document node IDs.

 This array contains a list of all IDs of all document nodes that
 are used for counting when adding a new node.

     array


$path

Current document path.

 This variable saves the current path while parsing a XML file and adding
 the nodes being read from the file.

     string


$position

Current document position.

 This variable counts the current document position while parsing a XML
 file and adding the nodes being read from the file.

     int


$root

Path of the document root.

 This string contains the full path to the node that acts as the root
 node of the whole document.

     string


$xpath

Current XPath expression.

 This string contains the full XPath expression being parsed currently.

     string


$entities

List of entities to be converted.

 This array contains a list of entities to be converted when an XPath
 expression is evaluated.

     array


$axes

List of supported XPath axes.

 This array contains a list of all valid axes that can be evaluated in an
 XPath expression.

     array


$functions

List of supported XPath functions.

 This array contains a list of all valid functions that can be evaluated
 in an XPath expression.

     array


$operators

List of supported XPath operators.

 This array contains a list of all valid operators that can be evaluated
 in a predicate of an XPath expression. The list is ordered by the
 precedence of the operators (lowest precedence first).

     array



Function Detail

XML

XML ( [$file = ""] )

Constructor of the class.

 This constructor initializes the class and, when a filename is given,
 tries to read and parse the given file.

 
Function Parameters:
- $file string Path and name of the file to read and parsed.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - load_file()

load_file

load_file ( $file )

Reads a file and parses the XML data.

 This method reads the content of a XML file, tries to parse its
 content and upon success stores the information retrieved from
 the file into an array.

 
Function Parameters:
- $file string Path and name of the file to be read and parsed.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - handle_start_element(), handle_end_element(), handle_character_data()

get_file

get_file ( [$highlight = array()], [$root = ""], $level )

Generates a XML file with the content of the current document.

 This method creates a string containing the XML data being read
 and modified by this class before. This string can be used to save
 a modified document back to a file or doing other nice things with
 it.

 
Function Parameters:
- $highlight array Array containing a list of full document paths of nodes to be highlighted by ... tags in the generated XML string.
- $root string While doing a recursion with this method, this parameter is used for internal purpose.
- $level int While doing a recursion with this method, this parameter is used for internal purpose.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
Return - string The returned string contains well-formed XML data representing the content of this document.
See - load_file(), evaluate(), get_content()

add_node

add_node ( $context, $name )

Adds a new node to the XML document.

 This method adds a new node to the tree of nodes of the XML document
 being handled by this class. The new node is created according to the
 parameters passed to this method.

 
Function Parameters:
- $content string Full path of the parent, to which the new node should be added as a child.
- $name string Name of the new node.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
Return - string The string returned by this method will contain the full document path of the created node.
See - remove_node(), evaluate()

remove_node

remove_node ( $node )

Removes a node from the XML document.

 This method removes a node from the tree of nodes of the XML document.
 If the node is a document node, all children of the node and its
 character data will be removed. If the node is an attribute node,
 only this attribute will be removed, the node to which the attribute
 belongs as well as its children will remain unmodified.

 
Function Parameters:
- $node string Full path of the node to be removed.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - add_node(), evaluate()

add_content

add_content ( $path, $value )

Add content to a node.

 This method adds content to a node. If it's an attribute node, then
 the value of the attribute will be set, otherwise the character data of
 the node will be set. The content is appended to existing content,
 so nothing will be overwritten.

 
Function Parameters:
- $path string Full document path of the node.
- $value string String containing the content to be added.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - get_content(), evaluate()

set_content

set_content ( $path, $value )

Set the content of a node.

 This method sets the content of a node. If it's an attribute node, then
 the value of the attribute will be set, otherwise the character data of
 the node will be set. Existing content will be overwritten.

 
Function Parameters:
- $path string Full document path of the node.
- $value string String containing the content to be set.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - get_content(), evaluate()

get_content

get_content ( $path )

Retrieves the content of a node.

 This method retrieves the content of a node. If it's an attribute
 node, then the value of the attribute will be retrieved, otherwise
 it'll be the character data of the node.

 
Function Parameters:
- $path string Full document path of the node, from which the content should be retrieved.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
Return - string The returned string contains either the value or the character data of the node.
See - set_content(), evaluate()

add_attributes

add_attributes ( $path, $attributes )

Add attributes to a node.

 This method adds attributes to a node. Existing attributes will not be
 overwritten.

 
Function Parameters:
- $path string Full document path of the node, the attributes should be added to.
- $attributes array Associative array containing the new attributes for the node.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - set_content(), get_content()

set_attributes

set_attributes ( $path, $attributes )

Sets the attributes of a node.

 This method sets the attributes of a node and overwrites all existing
 attributes by doing this.

 
Function Parameters:
- $path string Full document path of the node, the attributes of which should be set.
- $attributes array Associative array containing the new attributes for the node.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
See - set_content(), get_content()

get_attributes

get_attributes ( $path )

Retrieves a list of all attributes of a node.

 This method retrieves a list of all attributes of the node specified in
 the argument.

 
Function Parameters:
- $path string Full document path of the node, from which the list of attributes should be retrieved.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array The returned associative array contains the all attributes of the specified node.
See - get_content(), $nodes, $ids

get_name

get_name ( $path )

Retrieves the name of a document node.

 This method retrieves the name of document node specified in the
 argument.

 
Function Parameters:
- $path string Full document path of the node, from which the name should be retrieved.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
Return - string The returned array contains the name of the specified node.
See - get_content(), $nodes, $ids

evaluate

evaluate ( $path, [$context = ""] )

Evaluates an XPath expression.

 This method tries to evaluate an XPath expression by parsing it. A
 XML document has to be read before this method is able to work.

 
Function Parameters:
- $path string XPath expression to be evaluated.
- $context string Full path of a document node, starting from which the XPath expression should be evaluated.
Function Info:
Access - public
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array The returned array contains a list of the full document paths of all nodes that match the evaluated XPath expression.
See - $nodes, $ids

handle_start_element

handle_start_element ( $parser, $name, $attributes )

Handles opening XML tags while parsing.

 While parsing a XML document for each opening tag this method is
 called. It'll add the tag found to the tree of document nodes.

 
Function Parameters:
- $parser int Handler for accessing the current XML parser.
- $name string Name of the opening tag found in the document.
- $attributes array Associative array containing a list of all attributes of the tag found in the document.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
See - handle_end_element(), handle_character_data(), $nodes, $ids

handle_end_element

handle_end_element ( $parser, $name )

Handles closing XML tags while parsing.

 While parsing a XML document for each closing tag this method is
 called.

 
Function Parameters:
- $parser int Handler for accessing the current XML parser.
- $name string Name of the closing tag found in the document.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
See - handle_start_element(), handle_character_data(), $nodes, $ids

handle_character_data

handle_character_data ( $parser, $text )

Handles character data while parsing.

 While parsing a XML document for each character data this method
 is called. It'll add the character data to the document tree.

 
Function Parameters:
- $parser int Handler for accessing the current XML parser.
- $text string Character data found in the document.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
See - handle_start_element(), handle_end_element(), $nodes, $ids

split_paths

split_paths ( $expression )

Splits an XPath expression into its different expressions.

 This method splits an XPath expression. Each expression can consists of
 list of expression being separated from each other by a | character.

 
Function Parameters:
- $expression string The complete expression to be splitted into its different expressions.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array The array returned from this method contains a list of all expressions found in the expression passed to this method as a parameter.
See - evalute()

split_steps

split_steps ( $expression )

Splits an XPath expression into its different steps.

 This method splits an XPath expression. Each expression can consists of
 list of steps being separated from each other by a / character.

 
Function Parameters:
- $expression string The complete expression to be splitted into its different steps.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array The array returned from this method contains a list of all steps found in the expression passed to this method as a parameter.
See - evalute()

get_axis

get_axis ( $step, $node )

Retrieves axis information from an XPath expression step.

 This method tries to extract the name of the axis and its node-test
 from a given step of an XPath expression at a given node.

 
Function Parameters:
- $step string String containing a step of an XPath expression.
- $node string Full document path of the node on which the step is executed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing information about the axis found in the step.
See - evaluate_step()

search_string

search_string ( $term, $expression )

Looks for a string within another string.

 This method looks for a string within another string. Brackets in the
 string the method is looking through will be respected, which means that
 only if the string the method is looking for is located outside of
 brackets, the search will be successful.

 
Function Parameters:
- $term string String in which the search shall take place.
- $expression string String that should be searched.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - int This method returns -1 if no string was found, otherwise the offset at which the string was found.
See - evaluate_step()

is_function

is_function ( $expression )

Checks for a valid function name.

 This method check whether an expression contains a valid name of an
 XPath function.

 
Function Parameters:
- $expression string Name of the function to be checked.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - boolean This method returns true if the given name is a valid XPath function name, otherwise false.
See - evaluate()

evaluate_step

evaluate_step ( $context, $steps )

Evaluates a step of an XPath expression.

 This method tries to evaluate a step from an XPath expression at a
 specific context.

 
Function Parameters:
- $context string Full document path of the context from which starting the step should be evaluated.
- $steps array Array containing the remaining steps of the current XPath expression.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that are the result of evaluating the given XPath step.
See - evaluate()

evaluate_function

evaluate_function ( $function, $arguments, $node )

Evaluates an XPath function
 This method evaluates a given XPath function with its arguments on a
 specific node of the document.

 
Function Parameters:
- $function string Name of the function to be evaluated.
- $arguments string String containing the arguments being passed to the function.
- $node string Full path to the document node on which the function should be evaluated.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed This method returns the result of the evaluation of the function. Depending on the function the type of the return value can be different.
See - evaluate()

evaluate_predicate

evaluate_predicate ( $node, $predicate )

Evaluates a predicate on a node.

 This method tries to evaluate a predicate on a given node.

 
Function Parameters:
- $node string Full path of the node on which the predicate should be evaluated.
- $predicate string String containing the predicate expression to be evaluated.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed This method is called recursively. The first call should return a boolean value, whether the node matches the predicate or not. Any call to the method being made during the recursion may also return other types for further processing.
See - evaluate()

check_predicates

check_predicates ( $nodes, $predicates )

Checks whether a node matches predicates.

 This method checks whether a list of nodes passed to this method match
 a given list of predicates. 

 
Function Parameters:
- $nodes array Array of full paths of all nodes to be tested.
- $predicates array Array of predicates to use.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array The array returned by this method contains a list of all nodes matching the given predicates.
See - evaluate_step()

check_node_test

check_node_test ( $context, $node_test )

Checks whether a node matches a node-test.

 This method checks whether a node in the document matches a given
 node-test.

 
Function Parameters:
- $context string Full path of the node, which should be tested for matching the node-test.
- $node_test string String containing the node-test for the node.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - boolean This method returns true if the node matches the node-test, otherwise false.
See - evaluate()

handle_axis_child

handle_axis_child ( $axis, $context )

Handles the XPath child axis.

 This method handles the XPath child axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_parent

handle_axis_parent ( $axis, $context )

Handles the XPath parent axis.

 This method handles the XPath parent axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_attribute

handle_axis_attribute ( $axis, $context )

Handles the XPath attribute axis.

 This method handles the XPath attribute axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_self

handle_axis_self ( $axis, $context )

Handles the XPath self axis.

 This method handles the XPath self axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_descendant

handle_axis_descendant ( $axis, $context )

Handles the XPath descendant axis.

 This method handles the XPath descendant axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_ancestor

handle_axis_ancestor ( $axis, $context )

Handles the XPath ancestor axis.

 This method handles the XPath ancestor axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_namespace

handle_axis_namespace ( $axis, $context )

Handles the XPath namespace axis.

 This method handles the XPath namespace axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_following

handle_axis_following ( $axis, $context )

Handles the XPath following axis.

 This method handles the XPath following axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_preceding

handle_axis_preceding ( $axis, $context )

Handles the XPath preceding axis.

 This method handles the XPath preceding axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_following_sibling

handle_axis_following_sibling ( $axis, $context )

Handles the XPath following-sibling axis.

 This method handles the XPath following-sibling axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_preceding_sibling

handle_axis_preceding_sibling ( $axis, $context )

Handles the XPath preceding-sibling axis.

 This method handles the XPath preceding-sibling axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_descendant_or_self

handle_axis_descendant_or_self ( $axis, $context )

Handles the XPath descendant-or-self axis.

 This method handles the XPath descendant-or-self axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_axis_ancestor_or_self

handle_axis_ancestor_or_self ( $axis, $context )

Handles the XPath ancestor-or-self axis.

 This method handles the XPath ancestor-or-self axis.

 
Function Parameters:
- $axis array Array containing information about the axis.
- $context string Node from which starting the axis should be processed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - array This method returns an array containing all nodes that were found during the evaluation of the given axis.
See - evaluate()

handle_function_last

handle_function_last ( $node, $arguments )

Handles the XPath function last.

 This method handles the XPath function last.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_position

handle_function_position ( $node, $arguments )

Handles the XPath function position.

 This method handles the XPath function position.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_count

handle_function_count ( $node, $arguments )

Handles the XPath function count.

 This method handles the XPath function count.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_id

handle_function_id ( $node, $arguments )

Handles the XPath function id.

 This method handles the XPath function id.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_name

handle_function_name ( $node, $arguments )

Handles the XPath function name.

 This method handles the XPath function name.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_string

handle_function_string ( $node, $arguments )

Handles the XPath function string.

 This method handles the XPath function string.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_concat

handle_function_concat ( $node, $arguments )

Handles the XPath function concat.

 This method handles the XPath function concat.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_starts_with

handle_function_starts_with ( $node, $arguments )

Handles the XPath function starts-with.

 This method handles the XPath function starts-with.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_contains

handle_function_contains ( $node, $arguments )

Handles the XPath function contains.

 This method handles the XPath function contains.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_substring_before

handle_function_substring_before ( $node, $arguments )

Handles the XPath function substring-before.

 This method handles the XPath function substring-before.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_substring_after

handle_function_substring_after ( $node, $arguments )

Handles the XPath function substring-after.

 This method handles the XPath function substring-after.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_substring

handle_function_substring ( $node, $arguments )

Handles the XPath function substring.

 This method handles the XPath function substring.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_string_length

handle_function_string_length ( $node, $arguments )

Handles the XPath function string-length.

 This method handles the XPath function string-length.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_translate

handle_function_translate ( $node, $arguments )

Handles the XPath function translate.

 This method handles the XPath function translate.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_boolean

handle_function_boolean ( $node, $arguments )

Handles the XPath function boolean.

 This method handles the XPath function boolean.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_not

handle_function_not ( $node, $arguments )

Handles the XPath function not.

 This method handles the XPath function not.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_true

handle_function_true ( $node, $arguments )

Handles the XPath function true.

 This method handles the XPath function true.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_false

handle_function_false ( $node, $arguments )

Handles the XPath function false.

 This method handles the XPath function false.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_lang

handle_function_lang ( $node, $arguments )

Handles the XPath function lang.

 This method handles the XPath function lang.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_number

handle_function_number ( $node, $arguments )

Handles the XPath function number.

 This method handles the XPath function number.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_sum

handle_function_sum ( $node, $arguments )

Handles the XPath function sum.

 This method handles the XPath function sum.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_floor

handle_function_floor ( $node, $arguments )

Handles the XPath function floor.

 This method handles the XPath function floor.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_ceiling

handle_function_ceiling ( $node, $arguments )

Handles the XPath function ceiling.

 This method handles the XPath function ceiling.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_round

handle_function_round ( $node, $arguments )

Handles the XPath function round.

 This method handles the XPath function round.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

handle_function_text

handle_function_text ( $node, $arguments )

Handles the XPath function text.

 This method handles the XPath function text.

 
Function Parameters:
- $node string Full path of the node on which the function should be processed.
- $arguments string String containing the arguments that were passed to the function.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - mixed Depending on the type of function being processed this method returns different types.
See - evaluate()

prestr

prestr ( $string, $delimiter )

Retrieves a substring before a delimiter.

 This method retrieves everything from a string before a given delimiter,
 not including the delimiter.

 
Function Parameters:
- $string string String, from which the substring should be extracted.
- $delimiter string String containing the delimiter to use.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - string Substring from the original string before the delimiter.
See - afterstr()

afterstr

afterstr ( $string, $delimiter )

Retrieves a substring after a delimiter.

 This method retrieves everything from a string after a given delimiter,
 not including the delimiter.

 
Function Parameters:
- $string string String, from which the substring should be extracted.
- $delimiter string String containing the delimiter to use.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>
Return - string Substring from the original string after the delimiter.
See - prestr()

display_error

display_error ( $message )

Displays an error message.

 This method displays an error messages and stops the execution of the
 script. This method is called exactly in the same way as the printf
 function. The first argument contains the message and additional
 arguments of various types may be passed to this method to be inserted
 into the message.

 
Function Parameters:
- $message string Error message to be displayed.
Function Info:
Access - private
Author - Michael P. Mehl <mpm@phpxml.org>