• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ruby-104/ruby/lib/rexml/

Lines Matching defs:namespace

2 require "rexml/namespace"
11 # them a unique ID. We then convert the namespace prefix for the node
12 # to the unique ID. This makes namespace lookup much faster for the
13 # cost of extra memory use. We save the namespace prefix for the
143 # The evaluation is tested against +expanded_name+, and so is namespace
176 # The evaluation is tested against +expanded_name+, and so is namespace
210 # namespace is declared for this element. Evaluates recursively for
211 # ancestors. Returns the default namespace, if there is one.
214 # namespace if one exists
216 # the namespace URI as a String, or nil if no such namespace
217 # exists. If the namespace is undefined, returns an empty string
220 # b.namespace # -> '1'
221 # b.namespace("y") # -> '2'
222 def namespace(prefix=nil)
232 ns = parent.namespace(prefix) if ns.nil? and parent
237 # Adds a namespace to this element.
239 # the prefix string, or the namespace URI if +uri+ is not
242 # the namespace URI. May be nil, in which +prefix+ is used as
260 # Removes a namespace from this node. This only works if the namespace is
262 # default namespace.
270 def delete_namespace namespace="xmlns"
271 namespace = "xmlns:#{namespace}" unless namespace == 'xmlns'
272 attribute = attributes.get_attribute(namespace)
553 def attribute( name, namespace=nil )
556 prefix = namespaces.key(namespace) if namespace
558 prefix = namespaces.index(namespace) if namespace
568 # now check that prefix'es namespace is not the same as the
569 # default namespace
1037 # <tt>prefix:name</tt> namespace name.
1114 "\"#{@element.namespace(old_attr.prefix)}\" and prefix "+
1115 "\"#{value.prefix}\" = \"#{@element.namespace(value.prefix)}\"") if
1117 @element.namespace( old_attr.prefix ) ==
1118 @element.namespace( value.prefix )
1129 # namespace declaration, if one exists.
1226 # The +get_attribute_ns+ method retrieves a method by its namespace
1231 def get_attribute_ns(namespace, name)
1235 namespace == attribute.namespace() &&
1236 ( !namespace.empty? || !attribute.fully_expanded_name.index(':') )
1238 result = attribute if !result or !namespace.empty? or