Get an array of all Instruction
children. IMMUTABLE
Returns the index of the supplied child (starting at 1), or -1 if the element is not a child
an Element
child
Evaluates whether the given string matches an entity definition, returning true if so, and false otherwise.
Evaluates to the unnormalized value of this entity; that is, replacing all entities – both %ent; and &ent; entities. This differs from +value()+ in that value
only replaces %ent; entities.
Returns the value of this entity unprocessed – raw. This is the normalized value; that is, with all %ent; and &ent; entities intact
Fetches the index of a given child @param child the child to get the index of @return the index of the child, or nil if the object is not a child of this parent.
Inherited from Encoding
Overridden to support optimized en/decoding
Escapes all possible entities
Unescapes all possible entities
Returns an array of nodes matching a given XPath
.
Builds a nodeset of all of the preceding nodes of the supplied node, in reverse document order
includes every element in the document that precedes this node,
except for ancestors
Matches this template against tuple
. The tuple
must be the same size as the template. An element with a nil
value in a template acts as a wildcard, matching any value in the corresponding position in the tuple. Elements of the template match the tuple
if the are ==
or ===
.
Template.new([:foo, 5]).match Tuple.new([:foo, 5]) # => true Template.new([:foo, nil]).match Tuple.new([:foo, 5]) # => true Template.new([String]).match Tuple.new(['hello']) # => true Template.new([:foo]).match Tuple.new([:foo, 5]) # => false Template.new([:foo, 6]).match Tuple.new([:foo, 5]) # => false Template.new([:foo, nil]).match Tuple.new([:foo]) # => false Template.new([:foo, 6]).match Tuple.new([:foo]) # => false