Inserts switch
at the head of the list, and associates short, long and negated long options. Arguments are:
switch
OptionParser::Switch
instance to be inserted.
short_opts
List
of short style options.
long_opts
List
of long style options.
nolong_opts
List
of long style options with “no-” prefix.
prepend(switch, short_opts, long_opts, nolong_opts)
Opens a block for grouping objects to be pretty printed.
Arguments:
indent
- noop argument. Present for compatibility.
open_obj
- text appended before the &blok. Default is ”
close_obj
- text appended after the &blok. Default is ”
open_width
- noop argument. Present for compatibility.
close_width
- noop argument. Present for compatibility.
Returns the namespace of the attribute.
e = Element.new( "elns:myelement" ) e.add_attribute( "nsa:a", "aval" ) e.add_attribute( "b", "bval" ) e.attributes.get_attribute( "a" ).prefix # -> "nsa" e.attributes.get_attribute( "b" ).prefix # -> "elns" a = Attribute.new( "x", "y" ) a.prefix # -> ""
the document this child belongs to, or nil if this child
belongs to no document
@return the root Element
of the document, or nil if this document has no children.
@return the DocType
child of the document, if one exists, and nil otherwise.
Evaluates to the document to which this element belongs, or nil if this element doesn’t belong to a document.
Evaluates to an Array
containing the prefixes (names) of all defined namespaces at this context node.
doc = Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>") doc.elements['//b'].prefixes # -> ['x', 'y']
Returns an array of Strings containing all of the prefixes declared by this set of # attributes. The array does not include the default namespace declaration, if one exists.
doc = Document.new("<a xmlns='foo' xmlns:x='bar' xmlns:y='twee' "+ "z='glorp' p:k='gru'/>") prefixes = doc.root.attributes.prefixes #-> ['x', 'y']
A predicate filters a node-set with respect to an axis to produce a new node-set. For each node in the node-set to be filtered, the PredicateExpr is evaluated with that node as the context node, with the number of nodes in the node-set as the context size, and with the proximity position of the node in the node-set with respect to the axis as the context position; if PredicateExpr evaluates to true for that node, the node is included in the new node-set; otherwise, it is not included.
A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the context position and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function. Thus a location path para is equivalent to para.
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
Returns the first advertised TupleSpace
.
Does this dependency require a prerelease?
Compress filename
with extension
.
Indicate if this NameTuple
is for a prerelease version.