Module: REXML::Functions

Module REXML::Functions |
In: | /home/ser/Work/rexml/rexml/functions.rb

If you add a method, keep in mind two things: (1) the first argument will always be a list of nodes from which to filter. In the case of context methods (such as position), the function should return an array with a value for each child in the array. (2) all method calls from XML will have "-" replaced with "_". Therefore, in XML, "local-name()" is identical (and actually becomes) "local_name()"

Methods

boolean ceiling compare_language concat contains count false floor get_namespace id lang last local_name method_missing name namespace_context namespace_context= namespace_uri node node= normalize_space not number pair pair= position round starts_with string string_length substring substring_after substring_before sum text translate true variable variable=

Public Class methods

node=(value)

pair=(value)

variable=(value)

namespace_context=(value)

node()

pair()

variable()

namespace_context()

text( )

last( )

position( )

count( node_set )

id( object )

Since REXML is non-validating, this method is not implemented as it requires a DTD

local_name( node_set=nil )

NOT TESTED

namespace_uri( node_set=nil )

NOT TESTED

name( node_set=nil )

get_namespace( node_set = nil ) {|@@node if @@node.kind_of? Namespace| ...}

Helper method.

string( object=nil )

UNTESTED

concat( *objects )

UNTESTED

starts_with( string, test )

UNTESTED

contains( string, test )

UNTESTED

substring_before( string, test )

UNTESTED

substring_after( string, test )

UNTESTED

substring( string, start, length=0 )

UNTESTED

string_length( string )

UNTESTED

normalize_space( string=nil )

UNTESTED

translate( string, tr1, tr2 )

UNTESTED

boolean( object=nil )

UNTESTED

not( object )

UNTESTED

true( )

UNTESTED

false( )

UNTESTED

lang( language )

UNTESTED

compare_language(lang1, lang2)

number( nodes, object=nil )

sum( nodes )

floor( nodes, number )

ceiling( nodes, number )

round( nodes, number )

method_missing( id )