James G Smith > Gestinanna-0.02 > Gestinanna::XSM::Expression

Download:
Gestinanna-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Gestinanna::XSM::Expression - utilities for XSM expressions

SYNOPSIS ^

 $root = axis_self($root);
 @children = axis_child($root, $selector);
 @child_or_self = axis_child_or_self($root, $selector);
 @descendents = axis_descendent($root, $selector);

DESCRIPTION ^

These utility functions are used in compiled XSM expressions to handle the various axes as well as miscellanous things such as comparisons.

FUNCTIONS ^

axis_self

 $root = axis_self($root, $selector);

Regardless of the selector, this will return to current position in the data structure pointed to by $root.

axis_child

 @children = axis_child($root, $selector);

Returns any immediate children of $root which match the selector. If the root is an array, then the selector is expected to be numeric. If the root is a hash, then it is expected to be a string corresponding to a key within the hash. If the root is an object, then the selector is expected to be the name of a method. If the selector is *, then all children are returned if the root is not an object.

axis_child_or_self

 @children_or_self = axis_child_or_self($root, $selector);

This returns the same results as axis_child except that the first element in the returned list is the root.

axis_descendent

axis_descendent_or_self

axis_method

axis_attribute

set_element

xsm_cmp

xsm_range